Hi, Alexandre Ostanine!
On 10 Apr 97 09:03:07 you wrote to Balog Pal
AO> typedef struct {
AO> int a;
AO> }mystruct;
BP> struct mystruct { int a; };
BP> It's automatically a type. And you can use mystruct * right
BP> inside the {} if you like.
AO> Right ! But if you use typedef keyword - your structure will have a
AO> synonym wich you can use to redefine same structure with a different
AO> name , and next time you can declare it as:
AO> mystruct p;
AO> mystruct *a;
AO> instead of
AO> struct mystruct p;
AO> struct mystruct *a;
All these `struct'-s are needed _only_ in plain C. In C++ you can simply
write the upper lines along with the declaration at BP>. As I stated before,
any struct or class name is automatically a typedef too.
Paul
... Old MacDonald had a computer, with EIA I/O...
--- OS/2 Warp
---------------
* Origin: The FlintStones' Cave in BedRock (2:371/20)
|