c++.stl - problem with cin >> bool
- Winfried Mevenkamp (22/22) Aug 13 2003 Hi
-
Walter
(4/26)
Aug 13 2003
Try using the more modern iostream, which is
. Be sure to set ...
Hi This simple program compiled with DMC 8.34 #include <iostream.h> using namespace std; int main() { bool b; short n; cin >> n >> b; cout << n << b; return 0; } gives me the following error message dmc main.cpp -A -c -s -mld -v1 -o -3 cin >> n >> b; ^ main.cpp(9) : Error: reference must refer to same type or be const Had: bool and: int & main.cpp(14) : Error: need at least one external def --- errorlevel 1 any ideas ? Winfried
Aug 13 2003
Try using the more modern iostream, which is <iostream>. Be sure to set the include path to include \dm\stlport\stlport. "Winfried Mevenkamp" <gemi_gmbh t-online.de> wrote in message news:bhd6gu$7f6$1 digitaldaemon.com...Hi This simple program compiled with DMC 8.34 #include <iostream.h> using namespace std; int main() { bool b; short n; cin >> n >> b; cout << n << b; return 0; } gives me the following error message dmc main.cpp -A -c -s -mld -v1 -o -3 cin >> n >> b; ^ main.cpp(9) : Error: reference must refer to same type or be const Had: bool and: int & main.cpp(14) : Error: need at least one external def --- errorlevel 1 any ideas ? Winfried
Aug 13 2003