C style code in C++
Posted Sep 9, 2005 21:56 UTC (Fri) by
lordsutch (subscriber, #53)
In reply to:
C style code in C++ by djrom
Parent article:
A new Firefox buffer overflow
Indeed:
Don't use C++ standard library features, including iostream
Using C++ standard library features involves significant portability problems because newer compilers require the use of namespaces and of headers without .h, whereas older compilers require the opposite. This includes iostream features, such as cin and cout.
Furthermore, using the C++ standard library imposes difficulties on those attempting to use Mozilla on small devices.
There is one exception to this rule: it is acceptable to use placement new. To use it, include the standard header <new> by writing #include NEW_H.
(
Log in to post comments)