Is Visual Studio's 2008 Professional compadible with Windows 7
I recently upgraded to windows 7 from Vista and redownloaded Visual Studio's Professional 2008 onto it. However, since then my programs won't let me use string varaibles with cout and cin.
Here is a simple program example that won't compile
#include<iostream>
using namespace std;
int main()
{
string test = "Hello";
cout << test;
return 0;
}
The error points to line with "cout" and says: error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion)
So to me it seems to be a problem with the pre-defined <iostream> file where it defines the << operator. I have no clue how to fix this or why it happened. I didn't have this problem on Vista so I was wondering if Visual Studio's works on Windows 7? I have tried reinstalling Visual Studio 2008 multiple times but the problem still persists. Is the <iostream> file part of the Visual Studio installation or is it there when the operating system is installed?
Does anyone have any answers?
Re: Is Visual Studio's 2008 Professional compadible with Windows 7
Uhhh...
#include <string>
Perhaps?