wiki:cypress/Programming/CppExamples

C++ codes

Hello World

//hello.cpp: display a message on the screen 
#include <iostream>
 
int main()
{
   std::cout << "Hello, C++ world!\n";
   return 0;
}
  • Text after are comments.
  • can use C style comments.
  • can use C functions.
  • #include <iostream> to load the header file.
  • There are many header files in the standard C++ library.[1]
  • Program always begins with main() function.
  • main() returns a integer.

Compile with GNU C++

g++ hello.cpp

Compile with Intel C++

icpc hello.cpp

Links for tutorial

Examples of Job Script

See Examples

Parallel C++

Useful Libraries for Scientific Computing

deal.II - A Finite Element Differential Equations Analysis Library, tutorial

Last modified 10 years ago Last modified on 05/15/15 09:48:06
Note: See TracWiki for help on using the wiki.