My own iostream | Sololearn: Learn to code for FREE!

+3

My own iostream

Is it possible to create a source&header file with classes to be of same level (equivalence,importance,manner...) as those iostream and string and cmath that we #include all the time? Is it possible to make those libraries used without .h ?

2/25/2018 5:22:49 PM

Damir Ribic

3 Answers

New Answer

+3

It is very possible! I had to do a lot of reimplementation in college. If you plan on remaking something like ios library, I suggest looking through the headers first because theres a reason they were never remade or altered.

+2

I guessed it is not a good idea. But still, is it possible for "home made" classes to become same level, to #include them in a same manner as the "core" libraries such as iostream etc.?

+2

Oh so, for example, make an Employee class and #include "employee.h"? Yes, thats how it works! If you want to keep it saved for any project, put the .h file in your compiler's include folder