Okay basically i need some help with a trim function with char*. There is a random newline character in some c style strings that is screwing up things like strcmp(), i.e. \n001584805 is not the same as 001584805. Does anyone know of an efficient way to get rid of that newline character after the char*'s have all been created? Any help would be greatly appreciated,
You could put your char* into a std::string and use the string's find and erase functions. Then, you could delete your char* and reset it to the char* contained in the string.
If your requirements dictate that you could only use c style strings, then you would have to write your own removeNewlines function.