Difference Between these two types of functions

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, Moderators

Difference Between these two types of functions

Postby polimeruvijay » Thu Dec 06, 2018 3:23 am

Could anybody please explain what is the difference between these two functions, which I found in "FAFourSteelRCPlaneStress.h and .cpp", It seems both types are doing the same action, i.e. returning the same vector.

Type - 1 :

const Vector &getStress(void);
const Vector &getStrain(void);

Type - 2 :

const Vector &getCommittedStress(void);
const Vector &getCommittedStrain(void);

###-----------------------Function Definition in .cpp file -----------------------------------------------

const Vector& FAFourSteelRCPlaneStress::getStress(void)
{

return stress_vec;
}


const Vector& FAFourSteelRCPlaneStress:: getStrain()
{
return strain_vec;
}

const Vector& FAFourSteelRCPlaneStress::getCommittedStress(void)
{
return stress_vec;
}

const Vector& FAFourSteelRCPlaneStress::getCommittedStrain(void)
{
return strain_vec;
}

Thanks in advance ...
polimeruvijay
 
Posts: 26
Joined: Fri Jan 29, 2016 10:20 pm

Return to Framework

Who is online

Users browsing this forum: No registered users and 1 guest

cron