Похоже, вам нужно решение qt
:
#include <QStringList>
//...
QStringList L = line.split( ";" , QString::SkipEmptyParts );
// ^^^^^^^^^^^^^^optional
В C++ такой стандартной функции нет. Вы можете использовать следующий подход.
#include <iostream>
#include <sstream>
#include <vector>
#include <string>
//,,,
std::istringstream is( line );
std::vector<std::string> v;
std::string item;
while ( std::getline( is, item, ';' ) ) v.push_back( item );
Да, есть функция разделения. См.: Http://qt-project.org/doc/qt-4.8/qstring.html#split в качестве ссылки.
line
? ЕстьQString::split()
.