Post Created date
compilers are giving different results
MarkThomas wrote: I had a project with a variable "volatile uint8_t foo" in one file and "extern volatile char foo" in another file and it compiled fine.  I guess the...
Friday, 20 October 2017 - 22:29
What Makes C++ "Hard"?
mojo-chan wrote: Bah, where's my magnetized needle? I use butterflies.
Tuesday, 1 August 2017 - 16:27
Zeroring out an array
I think this discussion has gone off into the weeds with talking about string functions, while my impression is that the OP just wants to safely append a character to the end of...
Thursday, 27 July 2017 - 17:39
Overhead - C++ vs C ?
Re: number 4 (setters and getters): if you define small setters and getters in the class definition (such as simple read or write access to the private members), g++ is smart...
Thursday, 27 July 2017 - 00:15
Solved: Can't make encoder work correctly
The code in the article has this line: old_AB |= ( ENC_RD & 0x03 ); While your code has this line: old_AB |= (ENC_PORT & 0x0C); //read pins 2 and 3 simultaneouslyI...
Tuesday, 25 July 2017 - 18:32
Please share C++ projects that is based on OOP
JohanEkdahl wrote: Interesting. I will definitively have a look. Still, the author does the mistake (IMO) of not adopting the naming style of classes beginning with a capital...
Monday, 24 July 2017 - 15:54
What Makes C++ "Hard"?
OK, I'm at a computer now with some examples to show what I mean.   Here's my first example of designated initializers, for mapping arrays: const char *error_messages...
Sunday, 23 July 2017 - 23:41
What Makes C++ "Hard"?
clawson wrote: I'm now hard pushed to think of any way in which C is "better" than C++ and all this talk of slow/bloaty clearly comes from the ill informed who obviously aren't...
Sunday, 23 July 2017 - 15:05
What Makes C++ "Hard"?
Scroungre wrote: Okay, if you really want to fight, show me C code that divides by 256 (and truncates) and I'll show you assembler that is faster.  S.   I'll bite. How...
Friday, 14 July 2017 - 19:34
What Makes C++ "Hard"?
westfw wrote:At the moment, people seem to be all excited about "lambdas", and I'm thinking "pointers to functions; big deal.  Except now you don't have to explicitly write...
Wednesday, 12 July 2017 - 00:37
Is longjmp incompatible with serial on the ATmega32U4?
That should work fine (your code in post #16). But you also want to look at the return value of setjmp if you want to know if an exception happened.
Friday, 6 May 2016 - 14:18
Problem with a function that return a structure
C has supported returning a struct from a function since C89. In all of the ABIs that I'm familiar with, the caller allocates space for the structure (typically in its stack frame...
Friday, 6 May 2016 - 14:14