I'm actually not even sure if this is possible. But I'm making a program just to help make checking gains/losses with the stock market easier for me. It's not real money just trying it out to see how I would do.

But with the program, I'm just going to ask for the stock's symbol, price, and how many shares I want. and then the whenever I check that stock I'll put in the new amount that the stocks are worth, and do the math.

Alright so my question is. Is there a way to have previous data that I input (ex. symbol, price, and shares) and just have that saved for the next time I use the program?
I'm thinking a simple way would to have it create an output file to save the data in. Then whenever I run it again just use the data from there?

Recommended Answers

All 2 Replies

That's the correct solution.

Is it possible use structure to save the data into file save all the data before closing the program and at startup get the data from that file. I hope read about file manipulation try write some code and then ask for help by showing your hard work.
Best Of Luck.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.