title: Comparing 2-D char array in C++
body: <pre><code>using namespace std;
  #include&lt;iostream&gt;
  
  int main()
  {
      int n,i,j;
      int b[10];
      char a[50][50];
  
      cout&lt;&lt;"Dictionary\n";
      cout&lt;&lt;"Enter the no. of enteries you want to enter:";
      cin&gt;&gt;n;
  
      // Function 1 &amp; 2 : To add keys and values
      for(i=0;i&lt;n;i++)
      {
          cout&lt;&lt;"Enter the name:";
          cin&gt;&gt;a[i];
  
          for(j=0;j&lt;i;)
          {
              if(a[j]==a[i])
              {
                  cout&lt;&lt;"no";
                  cin&gt;&gt;a[i];
              }
              else
              {
                  j++;
              }
          }
  
          cout&lt;&lt;"Enter the marks:";
          cin&gt;&gt;b[i];
      }
      return 0;
  }
  </code></pre>
  
  <p>if we enter 2 entries ... which same name... then why its not going in the <code>if(a[i]==a[j])</code> ???
  like if a[i]='rohan' amd a[j]='rohan' too but it is not coming equal.... for initializing i can only use char</p>