1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#include <iostream> #include <string.h> using namespace std; struct Stu { char name[32]; int age; }; int main() { Stu s; memset(&s, 0, sizeof(s)); strcpy(s.name, "abc"); cout << s.name << endl; #if 1 cout << 1 << endl; #endif return 0; }