Comment by MrRadar
1 day ago
That's C++11 syntax. Before then you'd have to manually initialize them in every constructor, with a hand-written default constructor as a minimum:
struct test {
int my_int;
int *my_ptr;
test() : my_int(0), my_ptr(NULL) {}
};
No comments yet
Contribute on Hacker News ↗