init.cpp
· 344 B · C++
Raw
#include <cstdio>
#include <sstream>
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;
}
1 | #include <cstdio> |
2 | #include <sstream> |
3 | |
4 | void user_write(const char *string) { |
5 | const char* nice_string; |
6 | //std::ostringstream nice_string; |
7 | nice_string << string; |
8 | nice_string << "\r\n"; |
9 | //printf(string + "\r\n"); |
10 | printf(nice_string); |
11 | } |
12 | |
13 | int main(/*int argc, char **argv*/) { |
14 | user_write("example\r\n"); |
15 | printf("should be same"); |
16 | return 0; |
17 | } |
18 |