|
-
Mar 27th, 2002, 04:28 AM
#1
Thread Starter
Junior Member
Classes in if statements
I want to declare a class if a certain condition is true so i have placed teh constructor in an if statement which in turn is inside a while loop. However i cannot access the class outside the if statement. Is there anyway around this. This is what the code looks like -
void function()
{
While (reason)
{
if (something == true)
{
class newclass;
//Break out of the loop;
break;
}
}//end while
newclass.function1();
Any help would be appreciated/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|