J
Jakob Bieling
Hi,
I have the following scenario:
--- file1.cpp ---
size_t const array_size = 10;
--- end file1.cpp ---
--- file2.cpp ---
class test
{
int m_nums [array_size];
};
--- end file2.cpp ---
My compiler, VC++7.1, complains about not having a constant expression
for the array. Why can the array size not be 'calculated' at compile-time?
Or is it just a bug in VC++?
Thanks!
I have the following scenario:
--- file1.cpp ---
size_t const array_size = 10;
--- end file1.cpp ---
--- file2.cpp ---
class test
{
int m_nums [array_size];
};
--- end file2.cpp ---
My compiler, VC++7.1, complains about not having a constant expression
for the array. Why can the array size not be 'calculated' at compile-time?
Or is it just a bug in VC++?
Thanks!