I just want to get each line back from the command line.
So i copy the output into the stringstream.
But then i need to convert each line into a string to search through for a certain sequence of characters
Ive included some of the code below to give an idea of what i am trying to achieve
@cire
I dont think it does return an int, and if it does then something else must be happening behind the scenes because std::cout << system( File.c_str() );
definitely prints the output from tester to screen.
The main problem i had with the one where i put it into the stringstream was that if i converted to a string, it would display everything instead of the line with the word i was looking for.
@JLBorges
I thought about doing it this way but im ending up doing this a lot and having to create and delete a lot of files.
Is there no way of just exracting individual lines from a stream and putting them into seperate strings ?
Thanks again for helping :)
EDIT: Okay so after some testing it does return an int
But it also outputs everything else to the command prompt/console window
So it must somehow return that also ?
EDIT2: Ive got it working now but i had to create the file holding the information in the batch script which i didnt really like doing because it means i will have to delete the file in my C++ program and im pretty sure thats not good practice so if anyone has any suggestion i would appreciate any help :)