#include <string>
#include <vector>
#include <iostream>
int main()
{
std::string str = "hello,world";
std::vector<std::string> vct;
std::size_t pos = str.find(',');
if(pos != std::string::npos)
{
++pos;
vct.push_back(str.substr(0, pos));
vct.push_back(str.substr(pos));
std::cout << vct[0] << '\n' << vct[1] << '\n';
}
else
{
std::cout << "No commas in your string\n";
}
}
I2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPHZlY3Rvcj4KI2luY2x1ZGUgPGlvc3RyZWFtPgppbnQgbWFpbigpCnsKICAgIHN0ZDo6c3RyaW5nIHN0ciA9ICJoZWxsbyx3b3JsZCI7CiAgICBzdGQ6OnZlY3RvcjxzdGQ6OnN0cmluZz4gdmN0OwogICAgc3RkOjpzaXplX3QgcG9zID0gc3RyLmZpbmQoJywnKTsKICAgIGlmKHBvcyAhPSBzdGQ6OnN0cmluZzo6bnBvcykKICAgIHsKICAgICAgICArK3BvczsKICAgICAgICB2Y3QucHVzaF9iYWNrKHN0ci5zdWJzdHIoMCwgcG9zKSk7CiAgICAgICAgdmN0LnB1c2hfYmFjayhzdHIuc3Vic3RyKHBvcykpOwogICAgICAgIHN0ZDo6Y291dCA8PCB2Y3RbMF0gPDwgJ1xuJyA8PCB2Y3RbMV0gPDwgJ1xuJzsKICAgIH0KICAgIGVsc2UKICAgIHsKICAgICAgICBzdGQ6OmNvdXQgPDwgIk5vIGNvbW1hcyBpbiB5b3VyIHN0cmluZ1xuIjsKICAgIH0KICAgICAgICAgICAgCn0=