csv - r } string get_csv() s { string...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream> # using namespace std; u string get_csv(); s int main() { cout<<"Write a sentence using a comma.\n"; string return_text; return_text=get_csv(); cout<<return_text; return 0;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: r } string get_csv() s { string tmpstring=&quot;&quot;; char c=' '; c while(c!=',') { cin.get(c); if(c=='\n') c=' '; if(c==',') break; tmpstring+=(c); t } return tmpstring; r }...
View Full Document

Ask a homework question - tutors are online