ankakusu
21/11/2007, 09:42
yazdığım kod işte bu:
int main(int argc, char* argv[])
{
const int flNo=1;
const int reserv=1;
int passangers = 3;
int rowRes1[passangers] = {3, 3, 1, 1};
char colRes1[passangers] = {’A’, ’B’, ’B’, ’C’};
return 0;
}ama aldığım hata bu:
Anlamadım niye böyle bir hata veriyor?
-error C2057: expected constant expression
E:\cpp\odev1\odev1\odev1.cpp(11) : error C2466: cannot allocate an array of constant size 0
E:\cpp\odev1\odev1\odev1.cpp(12) : error C2057: expected constant expression
E:\cpp\odev1\odev1\odev1.cpp(12) : error C2466: cannot allocate an array of constant size 0
int main(int argc, char* argv[])
{
const int flNo=1;
const int reserv=1;
int passangers = 3;
int rowRes1[passangers] = {3, 3, 1, 1};
char colRes1[passangers] = {’A’, ’B’, ’B’, ’C’};
return 0;
}ama aldığım hata bu:
Anlamadım niye böyle bir hata veriyor?
-error C2057: expected constant expression
E:\cpp\odev1\odev1\odev1.cpp(11) : error C2466: cannot allocate an array of constant size 0
E:\cpp\odev1\odev1\odev1.cpp(12) : error C2057: expected constant expression
E:\cpp\odev1\odev1\odev1.cpp(12) : error C2466: cannot allocate an array of constant size 0