Hi there; please bare with me as I think this is a really basic question; googled without much help.
how would I cast the "value" of the string into int ?
I have:
char word[20]; // and this variable contains say "hello world"
and I tried the following
int word_int = atoi (word);
int word_int = (int) word;
int word_int = (int) &word;
but not of them seem to be giving the correct result ....
how would I cast the "value" of the string into int ?
I have:
char word[20]; // and this variable contains say "hello world"
and I tried the following
int word_int = atoi (word);
int word_int = (int) word;
int word_int = (int) &word;
but not of them seem to be giving the correct result ....