Hi every body!!

I have a Question that I could not Find any answer For it:icon_cry:

How Can I see The implementation Of the Build in classes in C++

class int , float , string , ostream ,.....and So on???


Pleaseee give me an answer??:icon_redface:


Regards,,

Sara .

Well types like int, float etc are fundermental, i.e. they are not classes. How the are converted into machine code requires examination of the compiler source code.

Types like ostream and string are part of the standard lib. So they are classes. This means that you can look at the standard headers and go from there. Normally they are full implemented in the standard header but it doesn't have to be the case.

If you use gcc you have the full source code for the compiler and you will see that std::ostream is implemented via

libstdc++-v3/include/ostream

and

libstdc++-v3/bits/include/ostream_insert.h

note that: file positoins are realative to the gcc directory. e.g.
/usr/local/gcc-4.3.3

Actually std::ostream is not that difficult to read. std::string is a bit more complex.


p.s. Please use descriptive titles in future, you are much more likely to get better answers.

Thank u stuXYZ..

But I work on Microsoft Visual Studio 2008..

Please use descriptive titles in future, you are much more likely to get better answers.

I'll do.. :)

If you want to see the implementation of Microsoft libraries, you'll need an NDA from them, and a whole load of money.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.