use of <iostream> vs iostream.h

bwells

Regular
Joined
Feb 25, 2003
Messages
84
I am building a simple DLL. I included iostream.h, and got a compiler error about this being depreciated. So I read up and learned I am supposed to use <iostream> to get the standard C++ libraries. But when I include <iostream>, non of my cout symbols are defined.

Can someone tell me if there is something special I need to do to use cout when I include <iostream>?? The docs say I get the new standard c++ libraries automatically if I include <iostream>.

I suspect that some of the other code I am including (not written by me) have includes such as stdio.h. Is there a way to work with this?


thanks
Bryan
 
You will probably need to add the line using namespace std;
to your code (under the using namespace System; line, if it's
there).
 
What DLL are you building? Managed or not managed one?
And using <nameofheader> without .h at the end is a new standard, all new compilers should work with it.
 
All of the iostream functions are stored in the std namespace;
if you type std:: in the IDE, an intellisense list will pop up.

using namespace in C++.net is like Imports in VB.NET and
using in C#.
 
Back
Top