Register / Login
C / C++
how to treat characters in a string like integers?
posted 3 years ago
how to treat characters in a
hey guys i have a simple function which reads in two integer arrays and outputs the number of same elements in the 2 arrays.
the output will be 2 here.
my function prototype is:
void compare(int list1,int list2);
but theres a glitch.
the modules which call the function pass the lists as character arrays.
So now i should rewrite the function and the prototype would be:
void compare(char* input1,char* input2);
I have absolutely no idea on how to compare two integers thus way. can Somebody please tell me how to compare two integers if the belong to a char array
on job hunt
Read this: (12,13,14) + (100,2,43,54) into two arrays
sum of two int arrays
String optimization weirdness
Comparing Array Elements