Quote:
Originally Posted by sylar
It's good that you are thinking about it, and certainly bring it up in your own code review (assuming you guys actually do code reviews). also, this being C++, it's much-much easier to shoot yourself in the foot. but as long as you don't introduce memory leaks, the objects and arrays and memory are there to be used, and are essentially a non-limited resource (*not* unlimited).
LOL Code review. I am most experienced guy here sadly but it is a decently relaxed good job and I am gaining experience for my resume and getting much better at programming imo.
Odd question that I am pondering right now though...
I declared it CArray<ExpenseClass, ExpenseClass&> Expenses;
Now I pass it to another function to basically read all the expenses from the database
Code:
bool GetAllExp(long lInventoryNumber, CArray<ExpenseClass, ExpenseClass&> ExpenseArray)
{
ExpenseClass MyExpense;
MyExpense.Save();
ExpenseArray.Add(MyExpense);
}
When I do that I get an error
Error 4 error C2248: 'CObject:
perator =' : cannot access private member declared in class 'CObject' ...\include\afxtempl.h 267
Any ideas?
http://social.msdn.microsoft.com/For...f-bab5254a9669
I actually just read that so maybe using a CArray not such a good idea.
I am not super familiar with the damn MFC libraries / specific structures templates
Last edited by Jeff_B; 02-16-2012 at 06:26 PM.