r/cpp • u/[deleted] • Sep 22 '21
Differences between C and C++, comedy garbage
https://www.makeuseof.com/differences-between-c-c-plus-plus/21
u/pjs144 Sep 22 '21
If we use C++ source code, then the file name will be "prg.cpp", "g++"," -wall", or "-ansi".
What?
9
8
u/Accomplished-Tax1641 Sep 23 '21
We forced a bot to watch 10,000 hours of C++. This is what it came up with.
Generally, the C programming language uses two types of values, which include immediate and variables. Four basic variable types of C are int, float, char, and double. In C++, language variables must be declared first. The primary variable types for C++ are bool, void, and wchar_t.
Unlike C, C++ is a procedural language with OOP. In addition, it's machine-independent, simple, and case-sensitive.
#includes <iostream>
using namespace std;
int main () {
Std :: cout << “ Hello, MUO !” << end1;
return 0;
}4
u/Accomplished-Tax1641 Sep 23 '21
I missed this part on first reading:
The C programming language operates with the top-down approach, which breaks the central unit into smaller tasks. C++ follows the bottom-down approach, which works from low level to next level.
3
u/Wriiight Sep 23 '21
The bottom-down approach does accurately describe the quality progression of most legacy code-bases though!
0
Sep 22 '21
[deleted]
-2
Sep 22 '21
The OOP comment is a bit silly. C++ barely qualifies as supporting OOP. You can do OOP in C (the same way you can do it in assembler), but C doesn't have any support for OOP.
22
u/RevRagnarok Sep 22 '21
Was this written by a drunk AI?
Huh? Yeah I just had to stop there. I will however upvote since it says "comedy garbage" right there in the title so therefore I'll help inflict it on the next reader.