| | |
Some thingthat we can do in C and Not in C++
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
Aha... implicit function declarations ! Rather weak thought, but it feels the same as saying something that can not be done in c but in c++, both are complete turing machines and can as such do everything a turing machine can (I heard somewhere that the template language in c++ are also turing complete, interesting side note).
C++ Syntax (Toggle Plain Text)
int main(...) { function( 10 ); } ... int function( 10 ) { }
/pern.*/i
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. Albert Einstein
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. Albert Einstein
•
•
•
•
Originally Posted by Narue
>Some thingthat we can do in C and Not in C++
Compile on certain embedded systems.
C99:
C89:
For the second program, C++/C99 sees the double line as
whereas C89 sees it as
C++ Syntax (Toggle Plain Text)
int main(void) { _Bool b; return 0; }
C++ Syntax (Toggle Plain Text)
int main(void) { double x = 1 //**/ 10; return 0; }
double x = 1 //**/ 10;double x = 1 //**/ 10; dwk
Seek and ye shall find.
"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.
"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison
"The only real mistake is the one from which we learn nothing."
-- John Powell
Seek and ye shall find.
"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.
"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison
"The only real mistake is the one from which we learn nothing."
-- John Powell
•
•
•
•
Originally Posted by dwks
C99:
C++ Syntax (Toggle Plain Text)
int main(void) { _Bool b; return 0; }
bool is typedefed as _Bool (which is the actual data type) in <stdbool.h>.
dwk
Seek and ye shall find.
"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.
"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison
"The only real mistake is the one from which we learn nothing."
-- John Powell
Seek and ye shall find.
"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.
"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison
"The only real mistake is the one from which we learn nothing."
-- John Powell
![]() |
Other Threads in the C++ Forum
- Previous Thread: spaces in binary file not showing
- Next Thread: 2 structs
| Thread Tools | Search this Thread |
api array beginner bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion count database delete desktop developer directshow dll download dynamic email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






