answersLogoWhite

0


Best Answer

The first thing to do is wrap the C code so the compiler knows to treat it specifically as C rather than C++:

// Include directives go here.

#ifdef __cplusplus

extern "C" {

#endif // __cplusplus

// C code goes here.

#ifdef __cplusplus

}

#endif // __cplusplus

Often that's all you need to do. However, be aware that C++ uses reserved keywords that C does not not know anything about, so if you have C variables named "this" or "class" or "virtual", etc, then you must rename them throughout the C code.

C does not adhere to the strict type-safety in C++. Therefore all calls to malloc (which returns void*) need to be cast to the specific type. Also, be wary of implicit casts from int to enum. C++ does not support this, but C does.

Also be aware of sizeof() differences. In C, sizeof(char) typically returns 4 (bytes), whereas in C++ it always returns 1 (byte).

User Avatar

Wiki User

9y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What to do to change c to c plus plus in turbo c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the differentiate of turbo c from turbo c plus plus?

Turbo C compiles c source. turbo c++ compiles c++ source code.


How the turbo c plus plus use in the computer?

How the turbo c plus plus use what in the computer.


Who develop the turbo c plus plus?

The company Borland developed Turbo C++.


Is there any difference between turbo c and c plus plus?

turbo c is a compiler and c++ is a programming language.


What is turbo c plus plus?

Turbo C++ is Borland's integrated development environment (IDE).


To develop a taj mahal using c-language programming in turbo c plus plus?

turbo c


Differentiate C plus plus and Turbo C?

Turbo C is a software where C or C++ programming environment resides in.But C++ is itself a programming language.


What is the different between turbo c plus plus and unix c plus plus?

There is no such thing as 'unix C++'.


What is tlink in c plus plus compiler?

TLINK is the Turbo C++ linker utility. You use it to link the object files created by the Turbo C++ compiler.


Do I need structure of turbo c plus plus?

Yes.


How do you download turbo c plus plus?

hotel and loding


Why do you study turbo c plus plus?

to waste time