Skip to main content
GameDev.net gamedev.net
🔒 Locked

how do i view STL source code

Started by amemorex Dec 19, 2001 at 5:36 PM 7 replies 550+ views
Original Post
amemorex
amemorex
for instance, where can i find this file.. #include and view the source of it?
Martee
Martee
Have you checked your compiler''s include directory? For example, I can find string, and all the other STL headers, in e:\Visual Studio .NET 7.0\Vc7\include. So have a look at wherever you installed your compiler.
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
amemorex
amemorex
yes but i can only find string.h, and since there is no extension for STL header files, i dont know their filename extensions/location
Arild Fines
Arild Fines
I believe the compiler vendor isnt actually _required_ to name the file containing the <iostream> header for iostream. As long as it provides some form of mapping mechanism, the <iostream>(or any other header) can just as well be stored in the file foo.bar.
Of course its much simpler just to give the file the same name in the first place

Fantastic doctrines (like Christianity or Islam or Marxism or Microsoft-bashing) require unanimity of belief. One dissenter casts doubt on the creed of millions. Thus the fear and hate; thus the torture chamber, the iron stake, the gallows, the labor camp, the psychiatric ward - Edward Abbey
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
Russell
Russell
quote:
Original post by Arild Fines
I believe the compiler vendor isnt actually _required_ to name the file containing the header for iostream.



That is true. However, if the compiler fails to do this, it isn''t following the C++ Standard, and you could theoretically say it''s not a C++ compiler since it isn''t compliant to the C++ standard.

Actually, I don''t believe any C++ compiler is 100% compliant, so there really aren''t any C++ compilers in existence.
jacksonh
jacksonh
You might have to enable unknown file types in Windows Explorer to see them.
Stoffel
Stoffel
If you''re using MSVC, right-click on the filename in your code and hit "open".

The default filter for msvc on file->open does not include "*." files, so you have to change your file filter to be "*.*" to find the STL header files.

Alternatively, open up "find" (assuming Windows) from Start->Find files or folders and type-in "Vector".
Arild Fines
Arild Fines
quote:
Original post by Russell

That is true. However, if the compiler fails to do this, it isn''t following the C++ Standard, and you could theoretically say it''s not a C++ compiler since it isn''t compliant to the C++ standard.



That wasnt what I meant. I think the standard actually allows aliasing of header files. I''m too tired to go digging for it now though.



Fantastic doctrines (like Christianity or Islam or Marxism or Microsoft-bashing) require unanimity of belief. One dissenter casts doubt on the creed of millions. Thus the fear and hate; thus the torture chamber, the iron stake, the gallows, the labor camp, the psychiatric ward - Edward Abbey
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.