Quantcast
Channel: openFrameworks - Latest posts
Viewing all articles
Browse latest Browse all 40524

Using 'for' to loop a loop

$
0
0

I still seem to be missing something.

As far as assignment of arrays goes why does it have any effect on the program? Also how do you determine the correct assignment?

I had them assigned like this:

int ax1[200], ax2[200], ay1[200], ay2[200],ax0[200],ay0[200],ax3[200],ay3[200];

which from everything I have learned is the correct way to assign arrays. Unless I was trying to assign the hard values such as:

int ax1[3] = {1,2,3}

What do you mean by change to local variables? I did try moving my array declaration to a local position rather than the golbal position I had it in.

But I guess my main question is. I was under the impression that as long as you have enough numbers in your array you cant really have to many. therefore:

int x[10];

and

int y[300];

Should be equally valid as long as i only need to use 10 numbers from the array?

Can you give me an example of how you assigned them?


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>