If any body knows it, Pls. post me reply to this

Recommended Answers

All 7 Replies

C++ can to everything that C can do plus a lot more. There is nothing in C that can't be done by c++.

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).

int main(...)
{
  function( 10 ); 
}

...

int function( 10 )
{
}

>Some thingthat we can do in C and Not in C++
Compile on certain embedded systems. :)

>Some thingthat we can do in C and Not in C++
Compile on certain embedded systems. :)

Yea, but those embdded systems are not ansi C compliant either. There is a different C standard for embedded systems, such is a subset of standard C and embedded systems don't have to use that standard either. Many embedded systems don't support C at all.

C99:

int main(void) {
    _Bool b;
    return 0;
}

C89:

int main(void) {
    double x = 1 //**/ 10;
    return 0;
}

For the second program, C++/C99 sees the double line as

double x = 1 [i]//**/ 10;[/i]

whereas C89 sees it as

double x = 1 /[i]/**/[/i] 10;

C99:

int main(void) {
    _Bool b;
    return 0;
}

what is _Bool ? never seen that data type. should it be bool ?

bool is typedefed as _Bool (which is the actual data type) in <stdbool.h>.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.