Thread: On right track?
View Single Post
Old 10-13-2005, 05:35 AM   #2 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,726
redhead is on a distinguished road
Quote:
Code:
#include <stdlib.h>
Waba.... where in this piece of code does it require the stdlib header ??
Quote:
Code:
#include <conio.h>
Given that this is just a simple implementation I would suggest to use the math header instead, atleast it is system independant, and later on we might end up doing some serius mathmatical equations where it might come in handy.
Quote:
Code:
Matrix2x2(int = 1. int = 1, int = 1, int =1);
That is just plain wrong
You can't create a function like that..
Code:
Matrix2x2(float nOne=1.0, float nTwo=1.0, float nThree=1.0, float nFour=1.0);
might be a better aproach, firstof you're private variables are floats, if you're gonna assign int values to them, why the hell declare them as floats in the first place??
Quote:
Code:
void calcDet();
You might want this to return a float, given that the determinant often reveals a value...
Quote:
Code:
Matrix2x2 operator*();
This could be returning Matrix2x2& if I'm not mistaken.

And the calculations for determinant and multiplications are strait out of the box, it's math 101. May I suggest Linear Algebra - Gateway to methmatics by Robert Messer, isbn: 0-06-501728-5 as a good reference.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote