C++分割字符串(以逗号分隔符为例,分割得到相应数字)
输入一连串数字,数字之间逗号隔开,把数字存到数组或者向量里。#include <iostream>#include <string>#include <vector>#include <stdio.h>using namespace std;int main(){ string str_input; cout<<"输入一串以逗号为分隔符的数字字