Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Array in class
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#10
RE: Array in class

The last method should still work for classes:
void OnStart()
  {
    Test t;
    printArray(t.array,"T");
  }
  
class Test
{
    int[][] array;
    
    Test()
     {
        array = int[][](4,int[](5,0));
     }
}

void printArray(int[][] ar, string name)
{
  AddDebugMessage(name,false);
  for(uint i =0; i<ar.length(); i++)
  for(uint j =0; j<ar[i].length(); j++)
  AddDebugMessage("["+i+","+j+"]" + ar[i][j],false);
}
04-18-2012, 04:18 PM
Find


Messages In This Thread
Array in class - by nemesis567 - 04-18-2012, 01:00 PM
RE: Array in class - by Cranky Old Man - 04-18-2012, 01:08 PM
RE: Array in class - by nemesis567 - 04-18-2012, 01:47 PM
RE: Array in class - by Cranky Old Man - 04-18-2012, 02:05 PM
RE: Array in class - by nemesis567 - 04-18-2012, 02:41 PM
RE: Array in class - by Apjjm - 04-18-2012, 02:49 PM
RE: Array in class - by nemesis567 - 04-18-2012, 02:52 PM
RE: Array in class - by Your Computer - 04-18-2012, 03:06 PM
RE: Array in class - by nemesis567 - 04-18-2012, 03:11 PM
RE: Array in class - by Apjjm - 04-18-2012, 04:18 PM
RE: Array in class - by nemesis567 - 04-18-2012, 04:33 PM



Users browsing this thread: 1 Guest(s)