add way to get the address of variable
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user