the error belongs to these lines:
#include %26lt;iostream%26gt;
using namespace std;
#include %26lt;vector%26gt;
When I compile my C++ code in linux, this error is printed: "no such file or directory",?
Maybe the setup your compiler is wrong.
patch up this codes, if you can run this then your compiler is working.
#include %26lt;iostream%26gt;
using namespace std;
int main()
{
cout %26lt;%26lt; "Hello World" %26lt;%26lt; endl;
return 0;
}
Note : your headers format is wrong, this the correct one.
#include %26lt;iostream%26gt;
#include %26lt;vector%26gt;
using namespace std; // always after all the headers otherwise you will use %26lt;vector.h%26gt; with "h" extension.
Reply:check to make sure you have those files. sometimes when folks build their linux box, the forget to install the headers for development. try doing a search for those files
Reply:check that all files and directories you are referrencing actually exist. I don't think vector is correct. read your documentation that came with the compiler.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment