Original Post
Hi guys. I hope you can help me out with this simple question. I am a beginner so try to explain it as simple as possible.
Ok this is what I want to do. I understand how to do this, but the question is why doesn't the other approach work?
How do some people do this when programming using c++?
1)
int i = 16;
char array = {0........ up to 16 characters};
Ok the big thing is I under stand how to do this with a for loop. Like
2)
for(int i =0; i<16; i+=)
{
array = ' some character ';
i++;
}
on 1) how is that done or can it be done at all?
Ok this is what I want to do. I understand how to do this, but the question is why doesn't the other approach work?
How do some people do this when programming using c++?
1)
int i = 16;
char array = {0........ up to 16 characters};
Ok the big thing is I under stand how to do this with a for loop. Like
2)
for(int i =0; i<16; i+=)
{
array = ' some character ';
i++;
}
on 1) how is that done or can it be done at all?