I'm compiling in .net and I am new to this environment. Though familiar with C++, I would call myself only a small step or 2 above a newbie. Can someone please shine the light on what should be so obvious here? What am I doing wrong? BTW, all the cout is necessary because I am not yet able to run in debug mode, only release, as I don't yet have privileges (e.g. not yet part of the debugger's group).
void main
{
try
{
ObjectType objectUnderTest = new ObjectType();
objectUnderTest->performFunction();
}
catch(...)
{
cout<<"Exception thrown"<<endl;
}
}
-----------------------------------------
void ObjectType:
erformFunction()
{
OtherData data = getOtherData();
// this displays an address
// I can cout data pieces and they look fine
//
cout<<" &data is "<<endl;
// Call method to perform calculation
//
double result = supportingMethod(data);
// this prints a 0 address and any attempt to
// access it's data elements raises an exception
//
cout<<" &data is "<<endl;
// do more stuff here
}
double ObjectType::supportingMethod( const OtherData & inData ) const
{
double resultOfCalculation = 0.0;
// perform calculation based on input inData
//
return resultOfCalculation;
}
-------------------------
void main
{
try
{
ObjectType objectUnderTest = new ObjectType();
objectUnderTest->performFunction();
}
catch(...)
{
cout<<"Exception thrown"<<endl;
}
}
-----------------------------------------
void ObjectType:
{
OtherData data = getOtherData();
// this displays an address
// I can cout data pieces and they look fine
//
cout<<" &data is "<<endl;
// Call method to perform calculation
//
double result = supportingMethod(data);
// this prints a 0 address and any attempt to
// access it's data elements raises an exception
//
cout<<" &data is "<<endl;
// do more stuff here
}
double ObjectType::supportingMethod( const OtherData & inData ) const
{
double resultOfCalculation = 0.0;
// perform calculation based on input inData
//
return resultOfCalculation;
}
-------------------------