Article View: net.lang.c
Article #9751Re: Why are typedef names in the same name space as variable names?
From: BEATTIE
Date: Wed, 05 Nov 1986 14:09
Date: Wed, 05 Nov 1986 14:09
16 lines
967 bytes
967 bytes
> 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.
Technical Details
Message-ID:
<286@hoqax.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!rutgers!clyde!cbatt!ihnp4!houxm!hoqam!hoqax!twbReferences:
<4220@ut-ngp.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!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