checking pointer to a string
how do i find if the first character of a pointer to a string doesnt equal a character:
Code:
void purge(char* check)
{
if(check[0] != "#")
{
check = strcat("#",check);
}
}
I'm gettting
Quote:
Cannot convert 'char' to 'char *' in function purge(char *)
string class to lower and check char
to change a string to lower case, go through the string one char at a time and use function: newString[i] = tolower(myString[i]);
to check if first is a letter you could use this function:
isalpha(myString[0])
both these functions are in <cctype>
given i havnt bothered to deal with the pointer stuff...