anyway, my question is..
how can i rid off the colon (:) so that i can convert into integer.
sample...
=============
int main()
{
char tmp = ":212:";
int mutated = 0;
//mutated = (int)(tmp); //converting to int...
//operation goes here...
}
===============
how can i remove the colons so that i can convert it into integers...
[edited by: coopster at 6:22 pm (utc) on Sep. 17, 2007]
[edit reason] Disable graphic smile faces [/edit]
char* skip_colons (char* src, char* dest) {
char* s = src;
char* d = dest;while (*s++) {
if (*s!= ':') {
*d++ = *s;
}
}
*d = '\0';return dest;
}