e.g 6 comes out as : -872412618
basically i can successfully convert each element in the array to an int, but i cant convert the whole char array to an int
Heres my C code:
char enterred[100];
fgets ( enterred, 100, stdin );
theNoUnsigned = (unsigned char)theNO; // theNo : each elemtn in the forloop, works good!
theValue = (int )enterred;
printf("\n\n int value: %d \n", thevalue);
** Edit **
This post has been edited by baconbeastnz: 05 June 2008 - 09:17 PM

New Topic/Question
Reply




MultiQuote




|