Possible? Simple loop to attach int to a string
I have a Windows Form app that has over 100 textboxes. I need to convert them all into integers so I can add them to an array. Is something to this extent possible:
int a [99]
for(int i = 0, i < 100, i++)
{
Int32::TryParse(textBox(i)->Text, a[i]);
}
I know it cant be done like this but I need something relatively simple like this. Thanks in advance.
Re: Possible? Simple loop to attach int to a string
You could use a stringstream, or strtol().
Re: Possible? Simple loop to attach int to a string
Sorry to be such a newbie but could give me an example of stringstream. I have read various sources on the net but they kind of go over my head alittle. I really feel like I'm not getting my money's worth in my Visual C++ class because we aren't going over a lot of things that to me seem vary important.
Re: Possible? Simple loop to attach int to a string