Declaring variable help.

What is the main function of the variable: numSpace(n)

Thanks
numSpace(n) consists of two undeclared identifiers. I suspect their main use is to cause errors on compilation.

Perhaps you could provide some context.
@cire - let me know if this is helpful?

In my variable list there is: int numSpaces(1);

then in the main body it reads as:



for (int d(1); d <= numSpaces; d++)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 0); //This sets the text colour to black
cout << BLANK; //print a space
}
for (int s(1); s <= numLeaves; s++)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 2); //This sets the LEAF colour to green
cout << LEAF;
}

cout << LEAF << LEAF << LEAF; //print a leaf symbol
cout << EOL; //go to next line
numLeaves = numLeaves+ 2; //This will set the number of leaves on the next branch
numSpaces--; //This will reduce the amount of black spaces on the next branch
}
Topic archived. No new replies allowed.