c++ outputting a ofstream variable | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

c++ outputting a ofstream variable

Hello! I am trying to get the console to read some data from a .txt file and everything I do doesn't seem to work! Can anyone help a homie out by giving an example and explaining? The data I am trying to read are integers and strings in this formation: PSS 121 400 600 70 KRL 234 1000 300 20 GHO 111 311 500 70

18th Mar 2018, 3:31 AM
Arbiter
2 Answers
+ 2
Thank you so much Ace and I must say... I like those sun glasses 😎 thanks 🙏
18th Mar 2018, 4:24 AM
Arbiter
+ 1
ofstream outputFileStreamVariable("outputFileName"); cin >> symbol >> currentPrice >> maximumReturn >> maximumLoss;
18th Mar 2018, 4:13 AM
Arbiter