linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Variable to sizeof function.
@ 2005-07-15 14:02 Vikas S
  2005-07-15 15:00 ` Vadiraj
  0 siblings, 1 reply; 13+ messages in thread
From: Vikas S @ 2005-07-15 14:02 UTC (permalink / raw)
  To: linux-c-programming


Hi,

I want to find out the size of a structure which the user will give as an argument 
as follows.

#include <>  -- All includes..
..
main(int arc, char *argv[])
{
printf("Size of structure %s is: %d\n", argv[1], sizeof(struct argv[1]));
}

However, I'm unable to compile. It's giving:
"sizeof applied to an incomplete type".

How can I get it working.

Thanks,
Vikas

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: Query in C
@ 2005-08-01 11:13 r_zaca
  0 siblings, 0 replies; 13+ messages in thread
From: r_zaca @ 2005-08-01 11:13 UTC (permalink / raw)
  To: linux-c-programming

[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 395 bytes --]

  Hello Avinash, 

  This is a function that returns a "int value" and allows you to pass as 
parameters two data types, an "int pointer" and a "foo data". 
  Well, I think it would be helpful. 
  That's it. 


>Hello Everyone , 
> 
>   Can anyone of you please tell me.. 
> 
>       what does extern "C" int func(int *,foo) accomplish ? 
> 
>   waiting for your reply. 
> 
>regards, 
>Avinash 

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-08-01 11:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-15 14:02 Variable to sizeof function Vikas S
2005-07-15 15:00 ` Vadiraj
2005-07-15 15:16   ` Rechberger Markus
2005-07-15 17:53     ` Vikas S
2005-07-15 22:35       ` Steve Graegert
2005-07-16  6:44         ` Vikas S
2005-07-16  7:04           ` Steve Graegert
2005-07-16  8:26           ` Steven Smith
2005-07-16 14:30           ` Eric Bambach
2005-07-17 16:27           ` Vadiraj
2005-08-01  6:10             ` Query in C avinash pawar
2005-08-01  6:44               ` Steve Graegert
  -- strict thread matches above, loose matches on Subject: below --
2005-08-01 11:13 r_zaca

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).