Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Which C++ language features cause porting problems?

0
Posted

Which C++ language features cause porting problems?

0

Our suggestions for Charm++ developers are: • Never declare the same loop index inside two adjacent loops. The C++ standard recently changed to make this legal: for (int i=…) … for (int i=…) … However, many compilers choke on the above, complaining of “duplicate declaration of int i”. Instead, use: int i; for (i=…) … for (i=…) … • Be wary of the C++ STL (Standard Template Library). Many compilers (such as Alpha cxx) do not accept the new-style ANSI header names without “.h”, like . The preprocessor symbol CMK_STL_USE_DOT_H will be set if the compiler demands . Other compilers, such as older versions of g++, are missing only certain ANSI headers, such as . Sometimes a compiler will appear to have perfectly good ANSI headers, but none of the members are declared in the “std” namespace. • Be wary of C++ exception handling when mixing with C code. Many compilers, including gcc on Linux, sensibly choose not to allow C++ exceptions to propaga

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123