= C++ codes = == Hello World == {{{#!C //hello.cpp: display a message on the screen #include int main() { std::cout << "Hello, C++ world!\n"; return 0; } }}} * Text after // are comments. * can use C style comments. * can use C functions. * '''#include ''' 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 == * [[http://www.cplusplus.com/doc/tutorial/|C++ Language Tutorial]] * [[http://en.wikibooks.org/wiki/C++_Programming|wikibooks]] == Examples of Job Script == [[https://wiki.hpc.tulane.edu/trac/wiki/cypress/Programming/Cexamples#ExamplesofJobscript|See Examples]] == Parallel C++ == * [[cypress/Programming/CppExamples/OpenMpCpp|OpenMP examples in C++]] * [[cypress/Programming/CppExamples/MpiCpp|MPI examples in C++]] == Useful Libraries for Scientific Computing == [[http://www.dealii.org/|deal.II]] - A Finite Element Differential Equations Analysis Library, [[http://www.dealii.org/7.1.0/doxygen/tutorial/index.html|tutorial]]