- Subject: Re: initializing a struct
- From: Vadiraj <vadiraj.cs@xxxxxxxxx>
- Date: Thu, 30 Jun 2011 15:48:25 +0530
- In-reply-to: <BANLkTimgJN2_SH+_mvkckZKBefCLN6aM=g@mail.gmail.com>
- List-id: <linux-c-programming.vger.kernel.org>
- References: <BANLkTimgJN2_SH+_mvkckZKBefCLN6aM=g@mail.gmail.com>
Hey Guys,
I'm stuck with logical reason for initializing a struct variable. Please help..
Consider a struct defined this way..
struct foo
{
int a;
char *ptr;
};
in my function I declare a local variable of this struct.
void bar()
{
struct foo local_var[10];
...
...
}
do you suspect a initialization issue? do we need to initialize the
local array local_var[10] ? What's the best practice?
Thanks in advance.
Cheers,
Vadi
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Assembler]
[Git]
[Kernel List]
[Fedora Development]
[Fedora Announce]
[Autoconf]
[Yosemite Campsites]
[Yosemite News]
[GCC Help]