| | |
can stdio.h be in one program with iostream.h?
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
If you are uisng VC++ 2005 or 2008 then you can't use iostream.h at all. That file is obsolete and has been replace with <iostream>
And yes, you can have stdio.h and <iostream> both in the same program.
And yes, you can have stdio.h and <iostream> both in the same program.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
•
•
Join Date: Dec 2006
Posts: 1,089
Reputation:
Solved Threads: 164
for the predefined streams, it's safe to mix C stdio and C++ iostreams. you can safely use
if you don't need to mix C stdio and C++ iostreams on the same stream, you can get better performance by turning this feature off
however, if you need to open a file with C++ iostreams, and at the same time access that file as a C FILE*, there's nothing in the C++ standard to support that usage by default. however, the library is extensible, and a
stdin and std::cin in the same program; the C++ Standard guarantees that it will work the way you would expect it to.if you don't need to mix C stdio and C++ iostreams on the same stream, you can get better performance by turning this feature off
std::ios_base::sync_with_stdio(false); however, if you need to open a file with C++ iostreams, and at the same time access that file as a C FILE*, there's nothing in the C++ standard to support that usage by default. however, the library is extensible, and a
std::streambuf derived class that supports this is just a couple of dozen lines of code. Why would you need stdio.h in C++ ?
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
•
•
•
•
hello there!
im creating a program with both stdio.h and iostream.h in the include header.
Can the program run with them both? or others?
Here's a nice thread with some explanation about headers and also a list of which header are c/c++ standard and what they do.
![]() |
Similar Threads
- Can't start the program ..error (C++)
- write a program which take a string give it permutations and combination (C++)
- Program help (C++)
- Can this program be written? (C)
- help me to correct this part of my program (C++)
- Need help with first c++ program (C++)
- Keeping Program Execution Going (C++)
Other Threads in the C++ Forum
- Previous Thread: How Do I . . . Make a Class Accessible from a DLL
- Next Thread: determinant 'pow'
Views: 1168 | Replies: 9
| Thread Tools | Search this Thread |
Tag cloud for C++
6 add api array arrays beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll encryption error file forms fstream function functions game getline givemetehcodez google graph homeworkhelper iamthwee ifstream input int integer java lazy lib linkedlist linux loop looping loops map math matrix memory microsoft newbie news node number output parameter pointer problem program programming project proxy python random read recursion recursive reference return sort string strings struct studio system template templates test text tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






