char chararray[4];
int intarray[4];
intarray = (int*)chararray;
Voila. Although the values in intarray are still the ascii codes rather than in the 1-26 range.
[...]
That does not work. Int elements are usually 32 bits and char elements 8 bits. Since you are reinterpret casting the pointers the value of intarray[0] holds all 4 characters of chararray (intarray[1] and upwards are out of bounds). You can regard chars as signed 8 bit numbers so this whole casting malarkey is overkill.
multi-brain fart on the sizeof(int) thing and the conversion functions ><.
Anywho, matrices weren't your problem because you weren't using matrices you were using multidimensional arrays. The "matrix multiplication" you were using WASN'T matrix multiplication. _________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish
but its the fact that the intention was what is the equivalent of a matrix in algebra. Just because i wasn't doing it right doesn't mean it wasn't my intentions.
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish
All times are GMT - 6 Hours Goto page Previous1, 2
Page 2 of 2
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum