pass ss tream as parameter c++

C++
std::ostringstream().flush() << "INSERT INTO accounts(username,password) VALUES('" << "test" << "','" << "test" << "')", this->connection);

Source

Also in C++: