how to obtain data from other member function?
-
dear all i am confused how to get previous function data? for example: void CAutoDetHumanDlg::OnSmoothImg(){imagedata=processedimage} void CAutoDetHumanDlg::OnCalculateFeatures(){here i need processedimage data} how can i obtain it from first function? thanks a lot. sorry, i am newbie
gentleguy
-
dear all i am confused how to get previous function data? for example: void CAutoDetHumanDlg::OnSmoothImg(){imagedata=processedimage} void CAutoDetHumanDlg::OnCalculateFeatures(){here i need processedimage data} how can i obtain it from first function? thanks a lot. sorry, i am newbie
gentleguy
Make it a member of your class. This way, it will be accessible from within any of your class member function.
Cédric Moonen Software developer
Charting control [v1.4] -
dear all i am confused how to get previous function data? for example: void CAutoDetHumanDlg::OnSmoothImg(){imagedata=processedimage} void CAutoDetHumanDlg::OnCalculateFeatures(){here i need processedimage data} how can i obtain it from first function? thanks a lot. sorry, i am newbie
gentleguy
For instance making
processedimage
(orimagedata
) member of theCAutoDetHumanDlg
class. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Make it a member of your class. This way, it will be accessible from within any of your class member function.
Cédric Moonen Software developer
Charting control [v1.4] -
thanks for your suggestion. now i have done the first function what i mentioned in former post, now i would like to use first function data in second function, how to get it?thanks a lot
gentleguy
If the data belongs to the
CAutoDetHumanDlg
class, it is accessible by any of its members. Just use it."Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
For instance making
processedimage
(orimagedata
) member of theCAutoDetHumanDlg
class. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
If the data belongs to the
CAutoDetHumanDlg
class, it is accessible by any of its members. Just use it."Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
thanks for your suggestion. now i have done the first function what i mentioned in former post, now i would like to use first function data in second function, how to get it?thanks a lot
gentleguy
Do you read and try to understand the answers that are given to you ?
Cédric Moonen Software developer
Charting control [v1.4] -
yes, you can see all belong to CAutoDetHumanDlg class, but how to get it? i don't know? sorry, thanks
gentleguy
gentleguy wrote:
but how to get it?
Both
OnSmoothImg()
andOnCalculateFeatures()
access the data in the same way."Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Do you read and try to understand the answers that are given to you ?
Cédric Moonen Software developer
Charting control [v1.4]This is a rethoric question, isn't it? :rolleyes:
Regards. -------- M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson Rating helpfull answers is nice, but saying thanks can be even nicer.
-
thanks, now if i don't change anything, i have done first function already, now i am doing second function, i need first function data. so how to get it?thanks a lot
gentleguy