delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/06/17:44:39

Message-Id: <200003062236.RAA14543@delorie.com>
X-Apparently-From: <gorkau AT geocities DOT com>
X-Sender: g_urrutia AT pop DOT mail DOT yahoo DOT com
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.0
Date: Mon, 06 Mar 2000 23:37:13 +0100
To: djgpp AT delorie DOT com
From: Gorka <gorkau AT geocities DOT com>
Subject: Problems with extern and sizeof
Mime-Version: 1.0
Reply-To: djgpp AT delorie DOT com

Hi,

I have these two files (mosqueo.c and kk2.c).
When I try to compile I get the following error:
kk2.c: Error: sizeof applied to an incomplete type.
Can anybody tell me why? And how to avoid it?

/* file 1: mosqueo.c */ 
void pp(); 
char dias[]={'3','2','3',0}; 
int main(){ 
int rr=sizeof dias; 
system("clear"); /* sustituir por system("cls"); en msdos */ 
pp(); 
printf("\n---%s---",dias); 
printf("---r= %d.\n",rr); 
return(0); 
}


/* file 2: kk2.c */ 
extern char dias[];
void pp(){ 
int kk=sizeof dias; //poner este, o el siguiente (test) 
printf("\n***%s***",dias); 
printf("***kk= %d.\n",kk); 
}

Gorka Urrutia.
gorkau AT geocities DOT com

http://www.geocities.com/g_urrutia/

'

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

- Raw text -


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