TITLE: new iostream headers (Newsgroups: comp.std.c++) PROBLEM: Ingo Luetkebohle I was used to the older iostream implementation and when I set out to use the new one, I was really puzzled. There's no "real" class in these headers -- just templates. Yet, if I use the standard classes, it works even though the header file doesn't has a definition ?? RESPONSE: clamage@pacific-88.Eng.Sun.COM (Steve Clamage), 21 Aug 96 Normally the C++ vendor will provide an instantiation of the templates on the char type and wchar type and put them in the run-time library. The name "ifstream", for example, is a typedef for basic_ifstream > The C++ runtime library will contain a complete precompiled set of functions and necessary objects for that type. When you write ifstream infile("myfile.txt"); the compiler treats it as basic_ifstream > infile("myfile.txt"); At program link time, the linker finds the necessary functions and objects in the library and does not need to generate any template code. The template implemenation code will reside in some standard location known to the compiler. If you need to instantiate a stream on some type of your own (not a job for the faint of heart), it finds the template source code and generates whatever is needed.