Need help with a stupid question.
Oct 11, 2012 at 11:58pm UTC
So just switched to VS 2012 from codeblocks, and im having trouble with the cin >> word;. The error code I get is this
Error: no operator ">>" matches these operands
operand types are : std::istream >> std:string
Don't know why cin isnt working with >> but here is my code maybe you can help me.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include "stdafx.h"
#include <iostream>
#include <vector>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
vector<string> readtext;
string word;
cin >> word;
return 0;
}
Thanks in advance for the help, and sorry for such a stupid question im new to visual studio so not sure how this IDE works completely yet.
Oct 12, 2012 at 12:12am UTC
Include header <string>
Last edited on Oct 12, 2012 at 12:12am UTC
Oct 12, 2012 at 12:30am UTC
Ohh god feel so dumb right now lol knew it would be something stupid like that and to think i spent 30 mins trying to figure out what was wrong. thanks
Topic archived. No new replies allowed.