0

Sir David W;

istringstream iss (str );
//str here is a variable? or with the command of istringstream?

tmp stands for whitespace or blank?

0

Test this code:

// call string constructor
string test2( "good better best" );

// call istringstream constructor
istringstream is( test2 );

string x,tmp,z;
// extract words/strings from is object
is >> x >> tmp >> z;

// show best good backwards
cout << z << ' ' << x;

Edited by David W

0

Sir David W;

Thank you Professor David W; your a good senpai;

But in a future problem, Can I put label or something like column header for each column?

And also, can this problem be solve?

1. for example; I have tons of text file (like 50+ text file inside of 1 folder) if I run the program that you have done (C++) the CSV file will be transfer to an empty folder same name in text file (but ofcourse it will be in CSV file).

2. This code can be run even without Visual Studio 2008?

3. Do I have to change the text file name in Visual Studio to get the CSV file?

Thank you for solving and teaching me at best;

Thank you very very much;

God Bless;

-zelrick

Edited by zelrick: add content

0

Is your expanded problem to process multiple files in a folder?

If so, then you could modify the example to be looking for the (input) .txt file names from standard input ...

Then ... perhaps ....
write a batch file, (that calls that compiled modified program .exe file), to process ALL the .txt files in that folder ...

After each file was processed, it would yield/output the corresponding .csv file.

Edited by David W

0

Hello Sir David W;

Yes sir, that problem will be a problem soon;

But my problem is not on mentioned in the topic so will be moving on;

Will be doing a new topic for the problem;

Thank you very very much Sir David W;

and God Bless you;

-zelrick

0

Sorry everyone, forgot to Mark this solve;

and I can't see how to mark this as solved;

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.