Hi. I have visual studio 2005 and i'm wondering does every header file has source (*.cpp) file with same name? For example windows.h and windows.cpp? If yes then where are all these source files? When using search on my computer i can find 3 times less cpp files than headers...

Recommended Answers

All 4 Replies

No. The .h files do not need to have an equivalent .cpp file.
Also, a .cpp file can include many .h files and a .h file can include .h files.

If you're looking for something specific, you might need to search through all of the .cpp files under Visual Studio looking for a reference to a particular <.h>

No, header file is completely different from cpp file. windows.cpp :D. I don't think Microsoft will just give away all there code. Internet Pirates would also really like kernel.c, with all the windows code xD.

so basicly headers are just connection between functions we use and appropriate windows dlls?

You could say that. Dll's contain many 'export' functions and headers help to 'import' them into your application (if the libraries are linked to your application). Those headers also contain necessary definitions (structs and macros).

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.