Help initialize 3-dim array with for loop please


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Help initialize 3-dim array with for loop please

  1. #1
    Join Date
    Nov 2002
    Posts
    2

    Help initialize 3-dim array with for loop please

    Hello,

    I want to do the following:

    double V[][] = sphere.V2;
    double polygon[][][] = {
    { V[0], V[1], V[2] },
    { V[1], V[2], V[3] },
    { V[2], V[3], V[4] },
    { V[3], V[4], V[5] },
    { V[4], V[5], V[6] },
    .
    .
    .
    { V[124], V[125], V[126] },
    };

    How can I set up a loop to initialize the values of polygon so that I dont have to type it all out?

    Thanx a lot

    -Big_Goon

  2. #2
    Join Date
    Sep 2002
    Posts
    78
    i can't make sense of this v is 2 dimensional and you call on it as 1 dimensional , sry if i misunderstood.
    ¿Red Baron?
    [code] /* dont forget code tags! */ [/code]
    Come visit the Café!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center