Been trying to figure this out for hours.
In my code I am generating a text file by this command.
system(wmic csproduct get uuid > test.txt);
It prints in the text file as:
1 2
|
UUID
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
How do I make it so that it finds that line of the text and then place it into a if-else statement to run a certain function?
Last edited on
I figured there was something more to it than just trying to find a string in that kind of file.
The only problem I had was with this line:
return {} ; // failed, return empty string
I just changed it to this:
return 0; // failed, return empty string
Thanks a lot. I didn't expect anyone to answer and I learned quite a bit.
Thank you, that worked out fine.