Related questions
What's the C++ suffix for long double literals?
In C++ (and C), a floating point literal without suffix defaults to double, while the suffix f implies a float. But what is the suffix to get a long double?
Without knowing, I would define, say,
const long double x = 3.14159265358979323846264338328;
…
Type of integer literals not int by default?
I just answered this question, which asked why iterating until 10 billion in a for loop takes so much longer (the OP actually aborted it after 10 mins) than iterating until 1 billion:
for (i = 0; i < 10000000000; i++)
Now my and many others' …
Multicharacter literal in C and C++
I didn't know that C and C++ allow multicharacter literal: not 'c' (of type int in C and char in C++), but 'tralivali' (of type int!)
enum
{
ActionLeft = 'left',
ActionRight = 'right',
ActionForward = 'forward',
ActionBackward = 'backward'
};
Standard says:
C99 6.4.4.4p10: "The …