[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
CppIfdef
Here is an example that makes a header file compatible under a console and a C++ Builder environment.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
CppIfdef
(C++) #ifdef
Preprocessor statement, meaning 'if defined'. Comparable to an if- statement. It can be used to make your header files compatible under multiple programming environmentsHere is an example that makes a header file compatible under a console and a C++ Builder environment.
void sayHello() { std::cout << "Hello World" << std::endl; }
- ifdef __STD_IOSTREAM__
- endif
void sayHello() { ShowMessage("Hello World"); }
- ifdef VCL_H
- endif
Topic links
- void
- std
- scope operator'::'
- cout
- stream out operator '<<'
- endl
- return
- #endif
- ShowMessage (C++ VCL)
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
