Repository for the course "Advanced Introduction to C++ and Scientific Computing"
if ( test )
{
// code
}
for ( int i = 0; i < N; i++ )
{
}
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 )
{
}
// includes
const int N = 1;
const double test = 3;
int main ()
{
}
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 )
{
}
No using namespace *anything*
in header files!
/**
* Documentation for classes/functions goes here
*/