Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!rutgers!clyde!cbatt!ihnp4!houxm!hoqam!hoqax!twb From: twb@hoqax.UUCP (BEATTIE) Newsgroups: net.lang.c Subject: Re: Why are typedef names in the same name space as variable names? Message-ID: <286@hoqax.UUCP> Date: Wed, 5-Nov-86 09:09:32 EST Article-I.D.: hoqax.286 Posted: Wed Nov 5 09:09:32 1986 Date-Received: Sat, 8-Nov-86 00:07:26 EST References: <4220@ut-ngp.UUCP> Organization: AT&T Bell Laboratories, Holmdel Lines: 16 > Why are typedef names in the same name space as variable names? In C > this presents very few problems, but in C++ it causes problems. Since > class names are implicitly made into typedef names, they are also in the > same name space as variable names. This means that you cannot have > something like: > > struct foo { /* ... */ }; > > int foo; > > in C++. > Don Nash To avoid things like: foo foo; Tom.