Hey guys,
I'm trying to finish up a program that's running fine except for one thing: my doubles aren't being read correctly from an array.
For instance, if I do:
double array[2][2];
array[0][0] = 1.2;
cout << array[0][0];
What I get is "0"
What am I doing wrong? I thought you could put doubles into an array just as easily as ints, but maybe not? Any help much appreciated!
Thanks,
Dan
I'm trying to finish up a program that's running fine except for one thing: my doubles aren't being read correctly from an array.
For instance, if I do:
double array[2][2];
array[0][0] = 1.2;
cout << array[0][0];
What I get is "0"
What am I doing wrong? I thought you could put doubles into an array just as easily as ints, but maybe not? Any help much appreciated!
Thanks,
Dan