diff options
author | Patrick Simianer <p@simianer.de> | 2014-06-15 03:50:12 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2014-06-15 03:50:12 +0200 |
commit | 258e1b92ebbfdebefabc120969ab87c3d8b75c3d (patch) | |
tree | ef4ab11fe0bf9d720cea23b35711358a8465feeb /c,cc/cat_char.cc | |
parent | cf3a29feb5887344b6633ead1b4b6d5657a15a4b (diff) |
old c,cc examples
Diffstat (limited to 'c,cc/cat_char.cc')
-rw-r--r-- | c,cc/cat_char.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/c,cc/cat_char.cc b/c,cc/cat_char.cc new file mode 100644 index 0000000..3daf564 --- /dev/null +++ b/c,cc/cat_char.cc @@ -0,0 +1,16 @@ +#include <iostream> +#include <string.h> + +using namespace std; + + +int main(void) +{ + char c[] = "c"; + char x[1024]; + string s("s"); + strcpy(x, s.c_str()); + strcat(x, c); + cout << x << endl; +} + |