Just as the question states above, is there any problems which could arise when letting the two languages work deeply together?
Just as the question states above, is there any problems which could arise when letting the two languages work deeply together?
Try to help all less knowledgeable than yourself, within
the limits provided by time, complexity and tolerance.
- Nor
If you compile all the C code as C++ code, there will be no problems.
For the most part, C code will compile and run properly as C++, but there are a few exceptions where the results will be different or valid C code will cause a C++ constraint violation. Take a look here for more details:
http://users.utu.fi/sisasa/oasis/cpp...c-and-cpp.html
-Prelude
My best code is written with the delete key.
What about using malloc to create a pointer to a class?
Using new calls the classes constructor, while using malloc does not. Then, wouldn't you have to call the classes constructor manually if you use malloc?
catfish *dual = malloc(sizeof(catfish));
vs.
catfish *dual = new catfish;
What would you do about the first example?