Help with data types

That's not a trivial question to answer.

This is a good list of what you have available to you: http://en.cppreference.com/w/cpp/language/types

Ask yourself what the data is, i.e a number, decimal, text string and pick a type that best represents the max/min of the range of possible input. For example, if a 10% discount is going to be a whole number between 0-100, an unsigned short would suffice, as would a signed int or unsigned char. Depends how picky you want to be.

From what you mentioned, 10% discount, probably a float/int and the other two a char array.
 
Last edited:
Back
Top Bottom