Category : composition

I’m developing in C++. I have 2 objects : which are the StandaloneAgent and the ConfigManager. I want from the Standalone Agent to reach a char * variable in the ConfigManager with a function . int32_t StandaloneAgent::getConfigFile(char * file){ int32_t code = mConfigMgr->getConfigFile(file); return code; } int32_t ConfigManager::getConfigFile(char * file){ file = mConfigFile; return 0; ..

Read more

Very often I need to provide a uint8_t array to some third-party library. Usually the third-party library asks for a uint8_t*, together with a length argument. Generally I use a std::vector<uint8_t> and use its data() and size() methods to get this information which works a treat. Now I’ve often found myself wanting to create this ..

Read more

I have an issue with my code , something about my virtual function and input/output operator and i don’t know how to fix it. I apologise in advance, this is a long one. first i created 2 classes ( with inheritance) . Class A and B like this : class A{ protected: int x; public: ..

Read more

I have an issue with my code , something about my virtual function and input/output operator and i don’t know how to fix it. I apologise in advance , i know this question is very long (exemples are long as well but they are part of a way longer code. tried to cut them as ..

Read more