data types in c++ - program without data types has no...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Why are Data types important in C++? In which instances would you want to use real numbers? In what instances would you not want to use real numbers? Answer C++ offers seven fundamental data types, which can symbolize any type of information and are built into the compiler. Five of these types are derived from C: void, int, float, double and char. C++ defines the other two: bool and wchar_t. Data types are essential to master because a
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: program without data types has no value. You always use integers (int), you only ever use real numbers (float) when you need the precision it gives you. You would never use floating-point for indexing, for example, but you might need it if you're making something like a calculator and need to be able to calculate decimal places....
View Full Document

This note was uploaded on 08/29/2010 for the course ENGINEERIN 305 taught by Professor Martincandell during the Spring '10 term at Rio Hondo College.

Ask a homework question - tutors are online