www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/01/16/17:15:16

From: "Lars Hansen" <lars DOT o DOT hansen AT gmx DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: sizeof(struct x) doesn't compile -- how to do it ?
Date: Thu, 16 Jan 2003 23:05:46 +0100
Organization: 1&1 Internet AG
Lines: 12
Message-ID: <b07abu$7s0$1@news.online.de>
References: <b07318$3eg$1 AT news DOT online DOT de> <3E271F40 DOT D20EC4DD AT phekda DOT freeserve DOT co DOT uk>
NNTP-Posting-Host: p5083890a.dip0.t-ipconnect.de
X-Trace: news.online.de 1042754750 8064 80.131.137.10 (16 Jan 2003 22:05:50 GMT)
X-Complaints-To: abuse AT online DOT de
NNTP-Posting-Date: 16 Jan 2003 22:05:50 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> If you are writing a C program, you need to write this:
>
>     struct x* n=malloc(2*sizeof(struct x));
>
> With C++ struct x { ... }; defines 'x' as a type in itself. In C you need a
> typedef.
>


ok; thanks for the info!


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019