Visual C++ 6 isn't good enough, what about Dev C++ 4? Yep, even Borland gives me the same error.
Printable View
Visual C++ 6 isn't good enough, what about Dev C++ 4? Yep, even Borland gives me the same error.
So this doesnt compile?:
Code:#include <iostream>
using namespace std;
int main()
{
cout<<"Hello world!";
}
Yes, it does.
But whenever I use it in larger programs (more than one include), it throws errors at me..like this:
Will not compile. Error message: "Could not find include file "stdlib". (That is only part of a program, I know that there is no main() listed here...hehe)Code:#include <stdlib>
#include <fstream>
#include <string>
using namespace std;
Because the C header files are prefixed with c.
E.g. it should be #include <cstdlib>
The C++ standard headers are:
<algorithm> <bitset> <cassert>
<cctype> <cerrno> <cfloat>
<ciso646> <climits> <clocale>
<cmath> <complex> <csetjmp>
<csignal> <cstdarg> <cstddef>
<cstdio> <cstdlib> <cstring>
<ctime> <cwchar> <cwctype>
<deque> <exception> <fstream>
<functional> <iomanip> <ios>
<iosfwd> <iostream> <istream>
<iterator> <limits> <list>
<locale> <map> <memory>
<new> <numeric> <ostream>
<queue> <set> <sstream>
<stack> <stdexcept> <streambuf>
<string> <strstream> <utility>
<valarray> <vector>
Wow, I never knew that.
Thanks Cat. Well it looks like this now
But it's acting like fstream doesn't exist.Code:#include <cstdlib>
#include <fstream>
#include <cstring>
using namespace std;
:rolleyes:
Start a new post then about your specific problem; it's almost certainly an error in your code -- the stream classes changed somewhat from their original pre-1998 incarnations, so maybe you use it in an strange way that is no longer supported. I'd have to see more than the includes to tell what is wrong.