N
nic977
I am trying to read in couple things from the command line argument, and
one of them suppose to be a integer, but when i try to cast it from a
char * to an integer, it gives strange number...... any idea how should
i do it....
this is the way i do it
void main (int argc, char *argv[])
{
....
int n;
n = (int) argv[1];
....
}
one of them suppose to be a integer, but when i try to cast it from a
char * to an integer, it gives strange number...... any idea how should
i do it....
this is the way i do it
void main (int argc, char *argv[])
{
....
int n;
n = (int) argv[1];
....
}