Hello all
I'm having a small problem, who tends to get bigger and bigger, as I cannot go past it.
The situation is as follows. I have a char array like this one:
char* row1[]={"Mada","666","10"};
What I want is to convert the numbers (666,10), who are now represented as strings, into integers, because I have some comparisons to do, and if I compare strings, I get that "10"<"9". And I want it to be the opposite.
I searched over the internet, including this forum, but it doesn't seem to work. The atoi function doesn't do anything.
1 2
|
int v;
v=atoi(row1[2]);
|
leaves the variable "v" untouched, and I don't understand why.
What am I missing here?