Define a primitive data type: Difference between revisions
Content added Content deleted
(fortran + lang tag or e) |
m (→{{header|C++}}: lang tag) |
||
Line 194: | Line 194: | ||
This class relies on implicit conversions to do most int operations; however the combined operations with assignment have to be coded explicitly. |
This class relies on implicit conversions to do most int operations; however the combined operations with assignment have to be coded explicitly. |
||
<lang cpp> #include <stdexcept> |
|||
class tiny_int |
class tiny_int |
||
Line 255: | Line 255: | ||
private: |
private: |
||
unsigned char value; // we don't need more space |
unsigned char value; // we don't need more space |
||
}; |
};</lang> |
||
=={{header|E}}== |
=={{header|E}}== |