#include #include void user_write(const char *string) { const char* nice_string; //std::ostringstream nice_string; nice_string << string; nice_string << "\r\n"; //printf(string + "\r\n"); printf(nice_string); } int main(/*int argc, char **argv*/) { user_write("example\r\n"); printf("should be same"); return 0; }