Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

CoolMiker

Arrays

This topic is 6668 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can someone give me examples on using arrays in complicated loops? Maybe even have a few pointers here and there?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
What do you mean exactly?

Share this post


Link to post
Share on other sites
Complicated loops? Hmm, heres one
for( ; ; ); 

Hehe, try that one

OneEyeLessThanNone

That's right, I typed out all that html to get the color effect ... please kill me...

Edited by - OneEyeLessThanNone on June 16, 2000 2:21:01 AM

Share this post


Link to post
Share on other sites

#define MAX 33

struct xy
{
int nInts;
int *x;
} x[MAX];


........

int j;

for(int i=0;i for(j=0;j {
printf("%d\n",x.x[j]);
}


Visit our homepage: www.rarebyte.de.st

GA

Edited by - ga on June 16, 2000 1:53:54 PM

Edited by - ga on June 16, 2000 1:56:51 PM

Share this post


Link to post
Share on other sites
    
for (int j=0; j< 256; j++)
{
for (int i=j; i>5; i--)
{
for (int k=i-j; i+j < 65; k+=i)
{
cout << "If you tried to figure this out then may god have mercy on your soul" << endl;
}
}
}


now that is complicated


"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
themGames Productions

Share this post


Link to post
Share on other sites
I meant something useful like how to have people input something, the it is stored in an array. For example, if the typed in numbers it would find the average,times a number was repeated, etc.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!