The bugs are for you to find! I'm wired in! Are you?
#include <iostream> #include <cstring> char *tmp() { char name[30]; static int s = 0; ++s; strcpy(name, "tmp"); name[3] = static_cast<char>(s + '0'); name[4] = '\0'; return(name); } int main() { std::cout << "Name: " << tmp( ) << '\n'; return(0); }
No comments:
Post a Comment