Need help with a stupid question.

closed account (3qX21hU5)
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.
Include header <string>
Last edited on
closed account (3qX21hU5)
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.