Sep 12, 2024
#include <iostream>
int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
}
int
for integersdouble
for decimalschar
for charactersbool
for boolean valuesstring
for sequences of charactersif (condition) {
// code to execute if condition is true
}
switch (variable) {
case 1:
// code
break;
default:
// code
}
int add(int a, int b) {
return a + b;
}
&
to get address, *
to dereferencenew
and delete
template <typename T>
T max(T a, T b) {
return (a > b) ? a : b;
}