I need to take some code within a function and put that within yet another function. The only problem is the variables are now out a scope. Whenever I try to pass them both as references I can hit with an onslaught of errors.
The relevant part of my code looks something like this:
Route::Route(std::string source) //constructor function
{
std::ostringstream oss;
function(source, oss);
}
void function(std::string* &source, std::ostringstream* &oss)
{
//function
}
The constructor should do things with source and oss, and then the function should also do things with them. Is it purely a syntactical error, or am I trying to do something impossible?