error C2679: binary ‘>>’ : no operator found … (VS2008)

When u compiling a source code that was developed on linux using gcc compiler with no success and got an error below,

1>d:\research\nurbssurface\main.cpp(4180) : error C2679: binary '>>' : no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion)

1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1144): could be 'std::basic_istream &std::operator >><std::char_traits>(std::basic_istream &,signed char *)'

So, here, the solution, change the #include <string.h> into #include <string>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s