Check out example codes for "helper functions c++". It will help you in understanding the concepts better.

Code Example 1

[helper.hpp]
std::string myReplace(const std::string& s);

[helper.cpp]
std::string myReplace(const std::string& s) {
   ...
}

[somefile.cpp]
#include "helper.hpp"
otherString3 = myReplace(myString3);

Learn ReactJs, React Native from akashmittal.com