Function warning
Posted: Mon Oct 12, 2015 7:14 pm
This is working, but i get a warning . I marked where the warning in the line is as 12.
(12) warning: return discards qualifiers from pointer target type|
const char *mytxt[50][50];
int loc;
char* getGameTxt(int txtnum, int txtnumtwo)
{
mytxt[0][0] = "PLAY";
mytxt[1][0] = "OPTIONS";
(12) return (mytxt[txtnum][txtnumtwo]);
}
(12) warning: return discards qualifiers from pointer target type|
const char *mytxt[50][50];
int loc;
char* getGameTxt(int txtnum, int txtnumtwo)
{
mytxt[0][0] = "PLAY";
mytxt[1][0] = "OPTIONS";
(12) return (mytxt[txtnum][txtnumtwo]);
}