by mrighele · 1y ago · 0 comments
struct test {
int my_int = 0;
int* my_ptr = std::nullptr;
};
Or is this something more recent ?You cannot initialize them with a different value unless you also write a constructor, but it not the issue here (since you are supposed to read them from the file system)
struct test {
int my_int;
int *my_ptr;
test() : my_int(0), my_ptr(NULL) {}
};