Hi guys,
need help with a function, it should return a substring and position where '.' should be switched for a '#'. Can i make a struct function and make a struct return that?
Instead of creating your own type, you could use a standard types like std::pair, or std::tuple. It's usually easier but the downside is that you don't get meaningful variable names for each of the values.
It's also possible to pass an argument by reference and have the function modify the argument instead of returning it as a return value.