Hello,
I am working with Visual C++ 6.0 compiler.
In the following declaration:
int const A = 10, B = 10;
both A and B are const. However, in declaration
int * const pA = SomePointer, pB;
The pB is just int and not int * const. Is it VC++ compiler bug? What pB has
to be according to C++ standard?
Also, VC++ allows the following declaration of two int * const:
int * const pB = SomePointerToIn t, * const pA = SomePointerToIn t;
However it says in help file, that const type qualifier can appear only once
in declaration. Where is the truth?
Thanks,
Sergey Tolstov
I am working with Visual C++ 6.0 compiler.
In the following declaration:
int const A = 10, B = 10;
both A and B are const. However, in declaration
int * const pA = SomePointer, pB;
The pB is just int and not int * const. Is it VC++ compiler bug? What pB has
to be according to C++ standard?
Also, VC++ allows the following declaration of two int * const:
int * const pB = SomePointerToIn t, * const pA = SomePointerToIn t;
However it says in help file, that const type qualifier can appear only once
in declaration. Where is the truth?
Thanks,
Sergey Tolstov
Comment