I have to write a program that outputs multiple-choice questions, takes the user's choices, then gives them a score.
I get an error message everytime I try to cout<< a string, however. Instead of posting my long code for the project, here is some simple code getting the same problem.
Code:
#include <iostream>
using namespace std;
void main () {
string s = "Hi!";
cout<<s;
}
Now...what am I missing? It's been two years since I've had to code C++, so its likely something i'm failing to include, but my google searched have turned up nothing except #include <string>, which failed to solve the problem.
Here is the error message:
1>------ Build started: Project: Become a Millionaire, Configuration: Debug Win32 ------
1>Compiling...
1>tryme.cpp
1>.\tryme.cpp(2) : fatal error C1083: Cannot open include file: 'stream': No such file or directory
1>Build log was saved at "file://c:\Documents and Settings\Michael\My Documents\CyberCamps\C++ Programs\millionaire\Become a Millionaire\Debug\BuildLog.htm"
1>Become a Millionaire - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Version info here:
"Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727
Installed Edition: VC Express
Another potential problem is I just finished a semester of Java programming. Suddenly, I don't remember if you can even output strings in C++. I'd imagine you could...*scratches his head*