Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Buggy Strcat
#include <iostream> #include <string.h> const char* strcat(const char* a, const char* b) { char buf[512]; size_t aLen = strlen(a); strcpy(buf, a); strcpy(buf+aLen, b); return buf; } int main() { const char* a = "hello, "; const char* b = "world"; std::cout << strcat(a, b) << std::endl; return 0; }
run
|
edit
|
history
|
help
0
C++ Macro overload
defined(FOO)
ADL of operator expression & unqualified function call
list multiply
MSVC initializer code
Test
Problem_rstring_1
hangman
Rounding in C++
Matrix paths right-down only, going through XY