#include <iostream>
#include <sstream>
#include <locale>
#include <vector>
#include <iterator>
struct dot_ws : std::ctype<char> {
static const mask* make_table() {
static std::vector<mask> v(classic_table(), classic_table() + table_size);
v['.'] |= space; // dot will be classified as whitespace
return &v[0];
}
dot_ws(std::size_t refs = 0) : ctype(make_table(), false, refs) {}
};
int main()
{
std::string YourStringName = "8573656.5465467.5435325.3253255";
std::istringstream ins(YourStringName);
ins.imbue(std::locale(ins.getloc(), new dot_ws()));
std::istream_iterator<long> beg(ins), end;
std::vector<long> vectorLong(beg, end);
for(size_t n =0; n<vectorLong.size(); ++n)
std::cout << vectorLong[n] << ' ';
std::cout << '\n';
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3N0cmVhbT4KI2luY2x1ZGUgPGxvY2FsZT4KI2luY2x1ZGUgPHZlY3Rvcj4KI2luY2x1ZGUgPGl0ZXJhdG9yPgpzdHJ1Y3QgZG90X3dzIDogc3RkOjpjdHlwZTxjaGFyPiB7CiAgICBzdGF0aWMgY29uc3QgbWFzayogbWFrZV90YWJsZSgpIHsKICAgICAgICBzdGF0aWMgc3RkOjp2ZWN0b3I8bWFzaz4gdihjbGFzc2ljX3RhYmxlKCksIGNsYXNzaWNfdGFibGUoKSArIHRhYmxlX3NpemUpOwogICAgICAgIHZbJy4nXSB8PSBzcGFjZTsgIC8vIGRvdCB3aWxsIGJlIGNsYXNzaWZpZWQgYXMgd2hpdGVzcGFjZQogICAgICAgIHJldHVybiAmdlswXTsKICAgIH0KICAgIGRvdF93cyhzdGQ6OnNpemVfdCByZWZzID0gMCkgOiBjdHlwZShtYWtlX3RhYmxlKCksIGZhbHNlLCByZWZzKSB7fQp9OwppbnQgbWFpbigpCnsKICAgIHN0ZDo6c3RyaW5nIFlvdXJTdHJpbmdOYW1lID0gIjg1NzM2NTYuNTQ2NTQ2Ny41NDM1MzI1LjMyNTMyNTUiOwoKICAgIHN0ZDo6aXN0cmluZ3N0cmVhbSBpbnMoWW91clN0cmluZ05h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