0

Instead of using User input , how can I take an parameter input and convert it to a string, where I can than check for for input values.

char values[17] = "0123456789ABCDEF" ;

char numIn[15];
int num[15];
int ob, nb, i;

4
Contributors
6
Replies
7
Views
5 Years
Discussion Span
Last Post by thines01
0

EXAMPLE :

I have entered a parameter of to 2 arguments 12 , b2
there 12 = argv[1] ;
b2= argv[2];

how i make this into a string so i can run error checks.

0

for example if i but if i have a code input parameter as 12 b2 = so 12 base 2
for argv[1]
{
int ob = atoi(argv[1])
char values[17] = "0123456789ABCDEF"; // array used for table lookup
int ob

    how can I make  a for loop to check  for the char values[17]
0

For WHAT are you checking it?

What is your program actually supposed to do (overall)?
Is it supposed to be a number conversion program -- converting base 10 to other bases?
Is it supposed to convert a given base back to base 10?

...or something else?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.