Last active 1700916777

Broken piece of code to learn C++

jmjl's Avatar jmjl revised this gist 1700916777. Go to revision

1 file changed, 0 insertions, 0 deletions

gistfile1.txt renamed to init.cpp

File renamed without changes

jmjl's Avatar jmjl revised this gist 1700861103. Go to revision

1 file changed, 17 insertions

gistfile1.txt(file created)

@@ -0,0 +1,17 @@
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 + }
Newer Older