Re: GNU C++ code/concept help needed.

Mayank Jain <[email protected]> Mon, 19 Sep 2005 13:24:28 +0530
Newsgroups gmane.user-groups.linux.delhi.devel
Message-ID <[email protected]>
On 9/19/05, Mayank Jain <[email protected]> wrote:
> Rohit, it seems like you cannot create variables inside case statements.
> What you can do is create a pointer to ProfileCustomized *pcn &
> initialize it with new in your case
> pcn =3D new ProfileCustomized(nm) ;
> pc =3D pcn;

Rohit,
If you scope the variable declaration in the case statement, your
things will start working.

case 1:
{
int a =3D 101;	=

break;
}

-- =

regards,
makuchaku
---
http://makuchaku.info
When you speak out with the courage of your convictions, people listen!
-- Valmik Thapar, Wildlife Conservationist.