add struct example

This commit is contained in:
Janggun Lee committed 2022-11-21 18:16:42 +09:00
1 parent 094cbfdd2c
commit 2cd4e3a169
8 files changed
+218 -2

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
int nonce = 1; // For random input
struct Foo
{
int x;
};
struct Foo f()
{
struct Foo x;
x.x = nonce;
return x;
}
int main()
{
int x = f().x;
return x;
}