The following code works, but I was told that it does not compile with gcc 3.4.2 with Visual C ++ 2010 and may be illegal:
int ar1[]{0,1,2,3,4,5,6,7,8,9}, *ptr1 = ar1, ar2[]{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18}, *ptr2 = ar2;
Apparently you need to make some changes to work (something like this):
int ar1[]{0,1,2,3,4,5,6,7,8,9}; int *ptr1 = ar1; int ar2[]{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18}; int *ptr2 = ar2;
It is right? Unable to declare arrays and pointers?
(code compiles in QT + gcc 4.8)