When in doubt, decompose (break into smaller parts) the problem!
You need to display a GUI.
You need to accept input from two widgets and convert it integers.
You need to add a range of numbers.
You need to concatenate a string of what you're doing with the addition.
You need to display an answer in a widget and maybe redraw the window.
I've been having success copying the assignment into my source file and decomposing it as comments to frame out my program.
An example would be a: motorized vehicle aka a car or a bike etc.
Answer:
inFile.open("progdata.dat");
Explanation:
This command opens the file which is passed to it as an argument. We are quite used to the C++'s cin and cout functions contained in iostream library for reading and writing data, however, when working will real-life stuff, we find ourselves working with huge data saved as separate files and require our programs to read them, manipulate them and possibly write back to the files... The first operation usually carried out before a file can be read or written to is open