Simon Slavin <[email protected]> wrote:
> So every C program is a C++ program
Not quite true. Here are a few examples that are valid C but invalid C++:
/* implicit 'int' return type */
f();
/* implicit conversion from void* to any pointer type */
char* p = malloc(100);
// calling a function without first declaring it.
undeclared(42);
// K&R style function definitions.
void f(x)
int x;
{
}
It is true, however, that it's fairly easy to transform any C program into a
program that's both valid C and C++, by applying straightforward modifications
- tightening type safety and such.
--
Igor Tandetnik
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users