TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: BALOG PAL
from: ALEXANDRE OSTANINE
date: 1997-04-10 07:03:00
subject: typedef

Balog Pal wrote in a message to Alexandre Ostanine:
BP>                            Hi, Alexandre Ostanine!
BP> On 4 Apr 97  10:44:25 you wrote to Rick Arding
 AO> Nice but wy don't you use that:
 AO> typedef struct {
 AO> int a;
 AO> }mystruct;
BP> typedef is not needed in C++. Just write
BP> struct mystruct { int a; };
BP> It's automatically a type. And you can use mystruct * right
BP> inside the {} if you like.
BP> Paul
BP> ... Cause of Death: CRC Error
BP> --- OS/2 Warp
Right ! But if you use typedef keyword - your structure will have a synonym 
wich you can use to redefine same structure with a different name , and next 
time you can declare it as:
    mystruct p;
    mystruct *a;
    instead of
    struct mystruct p;
    struct mystruct *a;
Alexandre
---
---------------
BP> * Origin: The FlintStones' Cave in BedRock (2:371/20)
* Origin: Just another Selverd point . (2:282/608.74)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.