Skip to content

Instantly share code, notes, and snippets.

@shigemk2
Created May 15, 2015 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save shigemk2/0f1111fb61c78d204128 to your computer and use it in GitHub Desktop.
Save shigemk2/0f1111fb61c78d204128 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct A{
char a[10000];
A() {
strcpy(a, "123");
}
A(const A& a) {
memcpy(a, a.a, sizeof(a));
}
void printn() {
printf("%s\n", a);
}
};
int main() {
A a;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment