summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMoreMoschops <moschops@yahoo.co.uk>2015-04-26 15:33:29 +0100
committerMoreMoschops <moschops@yahoo.co.uk>2015-04-26 15:33:29 +0100
commit7d5368eda1e2402b6b2bed85586fde0c6af87816 (patch)
tree923c4057f2b4c810fa306e0867735ac23bccecf0
parentfcd17c238cc3f6de828be3470626e4a14878aecc (diff)
Neither gcc nor clang accept void main.
Neither gcc nor clang accept void main. Remove this bad information. Tested as follows: $ cat 045.cpp void main() { } $ g++ 045.cpp 045.cpp:1:11: error: ‘::main’ must return ‘int’ void main() ^ $ clang++ 045.cpp 045.cpp:1:1: error: 'main' must return 'int' void main() ^~~~ int 1 error generated. $ g++ --version g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2 $ clang++ --version Ubuntu clang version 3.4.2-3ubuntu2~xedgers (tags/RELEASE_34/dot2-final) (based on LLVM 3.4.2)
-rw-r--r--c++.html.markdown3
1 files changed, 1 insertions, 2 deletions
diff --git a/c++.html.markdown b/c++.html.markdown
index 1a84efa4..ae93ceba 100644
--- a/c++.html.markdown
+++ b/c++.html.markdown
@@ -32,8 +32,7 @@ one of the most widely-used programming languages.
// variable declarations, primitive types, and functions.
// 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.)
+// main with an integer return type.
// 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)