Initializing member arrays in constructors
Posted: Thu Nov 22, 2007 4:06 pm
In this code:
Is there any way to initialize the array a in the constructor like the ":b(1)"? I tried "a({0})" and "a(0)" but failed.
Code: Select all
class C {
int a[10];
int b;
C(): b(1) {}
}