title: Compiler returns error "char *(int)' differs in levels of indirection from 'int ()'" even though data returned seems to match function return type
body: <p>Am just learning C and this is my first time on <em>stackoverflow</em> so am not sure if this is the right to ask this question because it seems trivial compared to the others around here but I found this piece of code in a text book and when I tried to compile in Visual studio I get this:</p>
  
  <pre><code>**error C2040: 'menutext' : 'char *(int)' differs in levels of indirection from 'int ()'**
  </code></pre>
  
  <p>To be honest I've looked at the code and I don't get why it the compiler is complaining. I really need some help on this. Here's the code:</p>
  
  <pre><code>/*********************************************************/
  /* */
  /* MENU : program which prints out a menu */
  /* */
  /*********************************************************/
  main ()
  { 
    int str_number;
    for (str_number = 0; str_number &lt; 13; str_number++)
    {
      printf ("%s",menutext(str_number));
    }
  }
  /*********************************************************/
  char *menutext(int n) /* return n-th string ptr */
  {
    static char *t[] =
    {
      " -------------------------------------- \n",
      " | ++ MENU ++ |\n",
      " | ~~~~~~~~~~~~ |\n",
      " | (1) Edit Defaults |\n",
      " | (2) Print Charge Sheet |\n",
      " | (3) Print Log Sheet |\n",
      " | (4) Bill Calculator |\n",
      " | (q) Quit |\n",
      " | |\n",
      " | |\n",
      " | Please Enter Choice |\n",
      " | |\n",
      " -------------------------------------- \n"
    };
    return (t[n]);
  }
  </code></pre>