linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vikas S <vikas_soolapani@yahoo.com>
To: linux-c-programming@vger.kernel.org
Subject: Variable to sizeof function.
Date: Fri, 15 Jul 2005 07:02:06 -0700 (PDT)	[thread overview]
Message-ID: <20050715140207.78402.qmail@web31901.mail.mud.yahoo.com> (raw)


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 

             reply	other threads:[~2005-07-15 14:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-15 14:02 Vikas S [this message]
2005-07-15 15:00 ` Variable to sizeof function 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050715140207.78402.qmail@web31901.mail.mud.yahoo.com \
    --to=vikas_soolapani@yahoo.com \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).