Bit of a novice really, I wrote some code under MS VS2008 IDE, it compiles fine but when I go to compile under Watcom (I want to make the code good for Win16) I get the following error/note:
arts.cpp(69): Error! E157: col(49) left expression must be integral
arts.cpp(69): Note! N717: col(49) left operand type is 'std::ostream (lvalue)'
arts.cpp(69): Note! N718: col(49) right operand type is 'std::basic_string<char,std::char_traits<char>,std::allocator<char>> const (lvalue)'
This seems to be the line causing trouble...
cout << "please enter " << sysConstName[countVal] << " value then press return: ";
sorry should mention that sysConstName[countVal] is a string array of 10 elements each haolding a short string of text, the countVal is simply parrt of a for loop to cycle through the array.
it looks like the compiler doesnt like the way I'm trying to output the contents of my array elements, where it see's cout << array[count]; it errors with:
Error! E157: col(49) left expression must be integral
Note! N717: col(49) left operand type is 'std::ostream (lvalue)'
Note! N718: col(49) right operand type is 'std::basic_string<char,std::char_traits<char>,std::allocator<char>> const (lvalue)'
is there any other way to output the element of an array without usinmg cout?
Nothing is wrong with that code. The problem is probably just because the compiler is pre-standard. In which case there's nothing really to do except write non-standard code (which of course means it won't work in other compilers).
So you'd probably have to shoot yourself in the foot to get this working.