c++输入带分隔符

#include   <iostream> 
#include   <cstdlib> 
//是赋值以逗号为分隔符
using   namespace   std; 

int   main() 
{ 
        int   a,b,c; 
        cin>> a;cin.ignore(1, ', '); 
        cin>> b;cin.ignore(1, ', '); 
        cin>> c;cin.ignore(1, ', '); 
        cout <<a <<endl; 
        cout <<b <<endl; 
        cout <<c <<endl; 
        system( "pause "); 
        return   0; 
}   

你可能感兴趣的:(C++,c,System,include,iostream)