Problems with Arrays in Visual Studio7.net

Started by
2 comments, last by Frank Henry 22 years, 2 months ago
hi all. i seem to be having problems with arrays:
  
float doink[16];

for (int i = 0; i < 4; i++)
  for (int x = 0; x < 4; x++)
    doink [i][x] = i*x;
  
i get a error about ''doink [x]''. am i forgetting something? do i have to set a flag or something? thank frank
Advertisement
These two types are different:
    float doink[16];float doink[4][4];    

You're trying to treat them the same. Hence the error.



Edited by - Stoffel on February 21, 2002 4:16:55 PM
iirc you used to be able to do it!

thanks anyway.

frank
Yeah, it was pointer arithmetic. You can use doink if you want to use 2 variables to access the array. . .<br><br>Edited by - acw83 on February 21, 2002 8:26:12 PM

This topic is closed to new replies.

Advertisement