No, I do not... could that be causing the problem? I mean, I could see why. I'll try it out now. Thanks for the input.
This is a discussion on Problems: Operator overloading. within the C++ Programming forums, part of the General Programming Boards category; No, I do not... could that be causing the problem? I mean, I could see why. I'll try it out ...
No, I do not... could that be causing the problem? I mean, I could see why. I'll try it out now. Thanks for the input.
I thought you did have that in your header and you were only defining the const version of the function. Honestly, I don't know what the problem is.
AHA! I had an awakening... I was lying on my bed, reading when I thought; maybe it doesn't have anything to do with the definition at all. Maybe it has something to do with my main cpp file which is testing all the methods.
Although I've narrowed it down, I still have no idea why I am getting unresolved externals..
Code:// Matrix.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "CMatrix.h" #include <iostream> int main(int argc, char* argv[]) { // Testing... using std::endl; CMatrix Matrix(5, 5); Matrix.SetSingle(3, 4, 4.302); Matrix.Redimension(6, 6); CMatrix CopyMatrix(6, 6); CopyMatrix.SetSingle(3, 4, 4.232); Matrix.Copy(CopyMatrix); Matrix.Clear(); Matrix.Redimension(6, 6); for (int x = 0; x < Matrix.GetRows(); x++) { Matrix.SetRow(x, 3.32, 4.32, 5.13, 6.75, 7.87, 6.55); } for (int i = 0; i < Matrix.GetRows(); i++) { for (int ii = 0; ii < Matrix.GetColumns(); ii++) { std::cout << Matrix.GetSingle(i, ii) << endl; } } return 0; }