- string literals are constchar*s, not char*s.
- Also, no need to put the explicit null at the end of those strings. The "quotes" do that automatically.
i did as you wrote but its still doesn't work
What I wrote will compile just fine. Show us the code that's giving you the error so we can spot what's wrong.
ok the problem is those strings char*carModels[6]={"ford focus","honda civic","citroen couple","peugeot 208","mazda RX6","golf GTI"};
char*carEngines[6]={"17cc","19cc","16cc","14cc","18cc","16cc"}; \
when i press built button it show errors and say char unexpected Error 2 error C2143: syntax error : missing ';' before '{' c:\documents and settings\gul\desktop\car galary\car galary\cars.cpp 8 car galary
Error 4 error C2065: 'carModels' : undeclared identifier c:\documents and settings\gul\desktop\car galary\car galary\cars.cpp 18 car galary
things like 6 errors i did it many times as you said but still doesnt work :(((
int main()
{
int select,select1,installment;
int total,total1, //<--- there is a ',' it should be a ';'
char*carModels[6]={"ford focus""honda civic""citroen couple""peugeot 208""mazda RX6""golf GTI"};