add way to get the address of variable

This commit is contained in:
T0b1
2024-05-06 04:10:13 +02:00
parent 53899ef3c3
commit eb98d911f6
7 changed files with 200 additions and 104 deletions

BIN
tmp/main

Binary file not shown.

View File

@@ -3,7 +3,7 @@
namespace {
struct MyType {
int data;
int data[3];
};
}
@@ -11,11 +11,11 @@ void helper_fn();
void helper_fn2();
int main(int argc, char* argv[]) {
MyType tmp = MyType{10};
while (tmp.data != 0) {
MyType tmp = MyType{{10, 5, 19}};
while (tmp.data[0] != 0) {
helper_fn();
helper_fn2();
tmp.data--;
tmp.data[0]--;
}
return 0;
}