Skip to content

Exercises/projects for the course "Advanced Introduction to C++ and Scientific Computing"

Notifications You must be signed in to change notification settings

klezm/cpp-scientificComputing

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Repository for the course "Advanced Introduction to C++ and Scientific Computing"

Coding-Guidelines

Always use braces (on new lines)

if ( test )
{
  // code
}

for ( int i = 0; i < N; i++ )
{
}

Spaces between operators

std::cout << "Test" << std::endl;
void function_name ( int a, int b )
{
}

int a = 0;
a += 1;
a = a + 1:
a = exp( 2 ) / 3;

// except:
// function calls
function_name( a, b );

// grouping paranthesis
if ( (a == 2 || b == 3) && (c == 4) )
{
}

// pointers/references
int* ptr = &a;
void function ( int* ptr, int& a )
{
}

No non-const globals

// includes

const int N = 1;
const double test = 3;

int main ()
{
}

Try to format your code nicely - 120 symbols per line max

printf( "This is just some random text %d %d %d"
        , a, b, c );

if ( long_name         == other_long_name
  && other_long_name2  == other_long_name3 )
{
}

Misc

No using namespace *anything* in header files!

/**
 * Documentation for classes/functions goes here
 */

About

Exercises/projects for the course "Advanced Introduction to C++ and Scientific Computing"

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 81.0%
  • Shell 8.2%
  • C 5.6%
  • Gnuplot 2.2%
  • CMake 2.1%
  • Makefile 0.6%
  • GLSL 0.3%