c++ - How to copy class variable and call in another file -
in main.cpp
void mainwindow::onfinish( imageresult* result ) m_imageidresult = *result; m_result = m_imageresult.allmetadata;
now want use m_result in display.cpp file. how copy m_result can use in other file. tried following have m_display in header file of display.h
m_displaymodel->howtodefinethisfunction(m_result, asset-> );
i sorry basic question, have been unlucky , spent 2 days figuring out. lot time.
the easiest way pass function parameter:
some_func_in_display_cpp_file(m_result, /* other parms ... */);
and define function as:
return_type some_func_in_display_cpp_file(const m_result_type&, /* ... */) {
Comments
Post a Comment