Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

for loop not working VC++

Jan 21, 2007 8:28AM PST

for(int cO = 0;cO<cU;CO++) {
Form1::Box->Items->RemoveAt(0);
}
-it says cO is undeclared identifier??

Discussion is locked

- Collapse -
Forget that, i got a new one though
Jan 21, 2007 8:38AM PST

char u[60] = "";

Form1::Box->Items->Add(u);
Form1::Box->Items->Add(String::Format(u);

-none of these are working...

- Collapse -
What is that.....
Jan 21, 2007 1:28PM PST

char u[60] = "";

makes little sense to me as the type of array u is should already be defined when the array was allocated I'd think.

Does the Items accept a character array directly or do you have to cast it to an object type would be what I'd wonder about the second line.

For the third the parantheses aren't matched would be an error from my view.

- Collapse -
simple solution?
Feb 11, 2007 12:11PM PST

did you look at the fact that cO is different than CO?

it is case sensative so it may just be something simple like that... technically CO is an undeclared identifier...