Migrating to Xcode and now having lots of "is not member of std" and some other header problems
I am migrating to OS X and now trying to use Xcode. There is a project that was compiling and running normally on a g++ linux distro, now on mac it is returning a thousand of errors. I guess that the linux std files, somehow included others files needed and now they are not this connected in the std of Mac OS X. How can I know what I am doing wrong, like here:
/Users/Jonathan/Development/C++/Josk/Var.h:257:0 No match for 'operator<<' in 'out << ((Josk::Var*)Jv)->Josk::Var:开发者_开发问答:ToString()' in /Users/Jonathan/Development/C++/Josk/Var.h
the code is:
friend ostream& operator << (ostream &out, Josk::Var &Jv){
out << Jv.ToString();
return out;
}
I don't know what to add here to solve this, here are the actual includes:
#include <iostream>
#include <ostream>
#include <typeinfo>
#include <map>
#include <utility>
#include <algorithm>
Thanks!
JonathanIt looks like you're missing #include <string>
.
精彩评论