Hi, I'm having trouble with the strcpy function:
In my program, I'm trying to see if the last character of the a character string, called charstring, is a backslash.
I get this error when I compile this:Code:char ch = charstring[strlen(charstring)-1]; if (strcmp(ch, "/") == 0) { cout << "ok" << endl; }
invalid conversion from `char' to `const char*'
I've tried creating pointers, but it still outputs the same error.
Does anyone have any ideas why this is happening?
Thanks