Help comparing char arrays

My program is supposed to pass 2 character array's to a function to see if they're equal. When I compare the two arrays, my program only compares the first letter. I want to compare the whole word.

char searchScore(char user[], Student curStudent[])
for(int i = 0; i < 8; i++)
if(*user == *curStudent[i].username)
return curStudent[i].grade;

return 0;
Well first off, these aren't two char arrays. You have a char array and a Student array. Does your Student struct/class have a char member?
Yea sorry I should have mentioned that. curStudent[i].username is a char array. At this part of the program it is defined as a 6 letter string.
Well, if you insist on using char arrays instead of std::string, then use this:

It's in string.h
Topic archived. No new replies allowed.