Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!kth.se!hemuli.tik.vtt.fi!Juha.Koivisto From: Juha.Koivisto@tel.vtt.fi (Juha Koivisto) Newsgroups: comp.lang.c++ Subject: Unreasonable include nesting Message-ID: <5232@hemuli.tik.vtt.fi> Date: 9 Nov 90 09:00:14 GMT Sender: news@hemuli.tik.vtt.fi Distribution: comp Organization: Technical Research Centre of Finland Lines: 23 I am running C++ cfront 2.1 (the version delivered with Objectworks for C++) on Sparc station 1. The preprocessor complains about "Unreasonable include nesting" when my file hierarchy is deeper than about 11 levels. In other words, a header file includes the header file of its base class, which includes the header file of its base class etc. more than about 11 times. I can see the point in having a nesting limit in C preprocessor but not in C++ preprocessor. C++ programmers are supposed to be able to use arbitrarily complex class hierarchies without having to read all the class definitions, right? So, is there a switch or some trick or some preprocessor to overcome this include nesting limit? I do not want to flatten my file hierarchy, and I do not want my .C files to know about the inheritance hierarchy. Juha Koivisto Technical Research Centre of Finland Telecommunications Laboratory Juha.Koivisto@tel.vtt.fi