|
-
Nov 5th, 2002, 04:26 PM
#1
Thread Starter
<?="Moderator"?>
#include the .h
when you include files wats the difference between
#include <iostream>
and
#include <iostream.h>
parksie is it differnet verson or a compiler issue?
Thanks
-
Nov 5th, 2002, 04:36 PM
#2
Good Ol' Platypus
The old (C) way is #include "iostream.h". Saying #include <iostream.h>, I believe, loads the 'old' iostream. Just <iostream> will load the C++ one. I think the same can also be done by <ciostream>; if such a header exists, it would be the C iostream header, not the C++.
But I'm probably totally wrong!
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Nov 5th, 2002, 05:26 PM
#3
Lively Member
iostream.h is the old iostream library, it's depreciated now and only there for backwards compatabilty.
iostream is part of the c++ standard library, so use this one.
-
Nov 5th, 2002, 05:28 PM
#4
Lively Member
there is no ciostream as it isn't part of standard C
-
Nov 5th, 2002, 05:58 PM
#5
Thread Starter
<?="Moderator"?>
btw whats a header file, is it like a list of constants or some thing??
Thanks
-
Nov 5th, 2002, 05:59 PM
#6
Monday Morning Lunatic
It's just a file you include wholesale. It might have preprocessor definitions, constants, class definitions, function prototypes, template functions, loads of stuff.
FE: Deprecated, not depreciated (subtle difference, check a dictionary )
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Nov 6th, 2002, 04:52 AM
#7
Lively Member
I think that iostream and iostream.h are incompatible i.e. you cannot mix methods from both. Is this correct?
-
Nov 6th, 2002, 04:53 AM
#8
Lively Member
FE: Deprecated, not depreciated (subtle difference, check a dictionary )
You live and learn...
-
Nov 6th, 2002, 05:20 AM
#9
Monday Morning Lunatic
Originally posted by FantastichenEin
I think that iostream and iostream.h are incompatible i.e. you cannot mix methods from both. Is this correct?
Correct. In fact, mixing iostream.h and a lot of things from the Standard Library is asking for trouble. For example, with <iostream>, you can do cout << string("blah") << endl. <iostream.h> doesn't recognise the string class, and can't.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|