comparing two variables

Hi I am trying to convert a char array at a certain point (i) with a string at a certain point (i).

1
2
3
char key2[26] = "abcdefghjklmnopqrstuvwxyz";

if (key2[i] == data.at(i)){}


I have narrowed the problem down to line 3, but cannot find a solution. As far as I am aware string::at returns a char value? So I do not understand why they cannot be compared. Any advice would be appreciated. Thanks.
So I do not understand why they cannot be compared.

Who says they cannot be compared?

I have narrowed the problem down to line 3

What problem?
Do you get an error message? An exception?
Nevermind it just suddenly hit me square in the face after a few hours of pondering. The issue was that it was going going out of memory so never mind I was just being an idiot.
Topic archived. No new replies allowed.