in reply to OT: Why does malloc always give me 24? [SOLVED]
Tip: Using typedef to create aliases of pointer types is generally frowned upon, especially when the name doesn't make it clear it's a pointer type.
Better:
typedef struct acme { int data; } acme;
Taking this one step further, I wouldn't use an all-lowercase name so I could do something like Acme acme;.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: OT: Why does malloc always give me 24?
by karlgoethebier (Abbot) on Aug 18, 2024 at 19:18 UTC | |
by ikegami (Patriarch) on Aug 19, 2024 at 04:09 UTC | |
by karlgoethebier (Abbot) on Aug 19, 2024 at 05:17 UTC | |
by NERDVANA (Priest) on Aug 20, 2024 at 06:43 UTC | |
by karlgoethebier (Abbot) on Aug 20, 2024 at 08:49 UTC | |
| |
by karlgoethebier (Abbot) on Aug 19, 2024 at 06:53 UTC | |
by NERDVANA (Priest) on Aug 20, 2024 at 06:05 UTC |