Here's what I'm trying to do:

Write a working C++ program that implements the following requirements:
- Develop a CALCULATOR in C++
- Implement at least six distinct arithmetic functions
- Allow for at least two functions to be combined
- Validate user input: do not allow invalid input
- Allow for a session of operations, that is, multiple operations (--> loop; track at least 10 operations)
- User variables of types appropriate for the arithmetic function implemented
- Write out up to last 10 operations to a text file
- Comment you code properly
- Provide a pleasant, aesthetic user interface and useful error messages

I created a 6 function calculator, but I did it using ints and doubles as my variables. Since I have to write the results to a text file, should I use strings and parse for numbers and operators instead? And should I use a for loop to track the operations? Thanks for any info.

To write the operations to a file, open up a filestream object, fout, and I would simply direct your operations into it as you go.
When the user hits plus, fout <<" + "; Unless you wanted to wait until the end of the line to make sure the user doesn't press clear or something. In that case you could keep concatenating the operations onto a string: calculation+=" +" ; at the end of the line, fout <<calculation<<endl;

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.