[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
cppint
Displaying differences between revision 1 and revision 2
= int =
AC++ data type (and thus a keyword) that can hold a single whole number. If you assign it to a broken number, this value gets rounded down. Your compiler should give you a warning then, as in the example below.
[code]
#include <assert.h>
int main(int argc, char* argv[])
{
const int myValue = 12;
const int myBrokenValue = 12.9;
assert(myValue==myBrokenValue);
return 0;
}
[/code]
== Topic links ==
* #include
* assert
* main
* int
* char
* std
* return
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
cppint
Displaying differences between revision 1 and revision 2
= int =
[code]
#include <assert.h>
int main(int argc, char* argv[])
{
const int myValue = 12;
const int myBrokenValue = 12.9;
assert(myValue==myBrokenValue);
return 0;
}
[/code]
== Topic links ==
* #include
* assert
* main
* int
* char
* std
* return
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
