diff options
author | Geoff Liu <g@geoffliu.me> | 2015-03-16 14:25:46 -0600 |
---|---|---|
committer | Geoff Liu <g@geoffliu.me> | 2015-03-16 14:25:46 -0600 |
commit | 366fe47ffa32d257fdbb703d8ae25f6078450db5 (patch) | |
tree | aa6e69071c1755a9dc4384c394f32018016f4429 /c++.html.markdown | |
parent | 752279248e4950b5b702896edefec7af4f7ca001 (diff) | |
parent | a6ea67e733d9ecede6c2d29d42a983ae4ffb4506 (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'c++.html.markdown')
-rw-r--r-- | c++.html.markdown | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/c++.html.markdown b/c++.html.markdown index 67fa054c..1978d183 100644 --- a/c++.html.markdown +++ b/c++.html.markdown @@ -30,10 +30,10 @@ one of the most widely-used programming languages. // C++ is _almost_ a superset of C and shares its basic syntax for // variable declarations, primitive types, and functions. -// However, C++ varies in some of the following ways: -// A main() function in C++ should return an int, -// though void main() is accepted by most compilers (gcc, clang, etc.) +// Just like in C, your program's entry point is a function called +// main with an integer return type, +// though void main() is also accepted by most compilers (gcc, clang, etc.) // This value serves as the program's exit status. // See http://en.wikipedia.org/wiki/Exit_status for more information. int main(int argc, char** argv) @@ -51,6 +51,8 @@ int main(int argc, char** argv) return 0; } +// However, C++ varies in some of the following ways: + // In C++, character literals are one byte. sizeof('c') == 1 |