Visual C++ 6 isn't good enough, what about Dev C++ 4? Yep, even Borland gives me the same error.
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!"; }
"Think not but that I know these things; or think
I know them not: not therefore am I short
Of knowing what I ought."
-John Milton, Paradise Regained (1671)
"Work hard and it might happen."
-XSquared
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>
Last edited by Cat; 10-05-2003 at 09:30 PM.
You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.
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;
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.
You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.