#include <sstream>
#include <string>
#include <iostream>
void old_code()
{
    std::stringstream concat;
    std::string txtFullPath = "Path here";
    concat.str("");
    concat << txtFullPath; 
    
    std::stringstream& p = concat;
    std::cout << p.str() << '\n'; //First path above
    std::stringstream path;
    path.str(p.str()); // does not advance the put pointer.
    path << "Ship01.tga"; // writes to characters starting at path.str()[0]
    std::cout << "Loading player ship from " << path.str() << '\n'; 
}
void new_code()
{
    std::stringstream concat;
    std::string txtFullPath = "Path here";
    concat.str("");
    concat << txtFullPath; // this makes it work


    std::stringstream& path = concat;
    std::cout << path.str() << '\n';
    path << "Ship01.tga";
    std::cout << path.str() << '\n';
}
int main()
{
    std::cout << "old code: \n";
    old_code();

    std::cout << "new code: \n";
    new_code();
}
