123456
void breakoriginalnumber (string & areacode, string & exchange, string & extension, string& tele) { areacode = tele.substr (1,3); exchange = tele.substr (6,3); extension = tele.substr(10,4); }
12345678910
//... for(int x = 0; x < n; x++) { breakoriginalnumber (areacode, exchange, extension, lines[x]); cout<< "areacode is " <<areacode; cout <<"exchange is " << exchange; cout<< "extension is " << extension; } //...