3 ms·
Pedantic: C++ code should generally have a .cpp extension.
by stirner 10y ago
Pedantic: C++ code should generally have a .cpp extension.
- cheez 10y agoLooks like it was written in the year 2000 so it is more than likely it was written on a UNIX system and used the .C suffix. I can't really tell though.
- bbayer 10y agoAuthor Alan Mycroft is co-founder of Raspberry Pi foundation. I assume, he was aware what he was doing back in the day.
- kchoudhu 10y agoYou're right: that is pedantic -- in the worst sense of the word.
- stirner 10y agoActually, worse: there are actually lots of C++ file extensions and .cpp doesn't even seem to be the most popular. I was mistaken, apologies.
- the_trapper 10y agoFor the record, .C (uppercase "C" on case sensitive file systems like *NIXen), .cxx, and .cc are also fairly common and perfectly acceptable.
- johndubchak 10y agoAgreed, but I would take this further. To call this C++ and be using character arrays for strings rather than std::string and performing manual memory management suggests this is "C with Classes" at best, notwithstanding the fact that it HEAP allocates a bunch of stuff that it never reclaims. I understand this isn't a code review and I'm not trying to be critical but it's saddens me to see poor C++ code being shown online because that's partly responsible for the bad rap of the language - I know there are other reasons, but this doesn't help.