#include using namespace std; int soucet(int a, int b) { return a + b; } int rozdil(int a, int b) { return a - b; } struct bod { int x; int y; // parametricky konstrukto bod() { x = 0, y = 0; } bod(int x, int y) { this->x = x; this->y = y; } void vypis() { cout << "[" << x << "," << y << "]" << endl; } }; int f(int i = 10, int j = 20) { cout << i << " " << j << endl; } int main(int argc, char** argv) { int f; // f(5); bod b(1, 2); cout << "[" << b.x << "," << b.y << "]" << endl; bod b1; // cout << "[" << b1.x << "," << b1.y << "]" << endl; b1.vypis(); /* // ukazatel na funkci int (*f)(int, int) = &soucet; cout << (*f)(10, 2) << endl; f = &rozdil; cout << (*f)(10, 2) << endl; // reference na funkci int (&r)(int, int) = soucet; cout << r(10, 2) << endl; typedef int integer; integer a = 10; typedef int* pInteger; int a = 100; cout << &a << endl; int* pA = &a; cout << pA << endl; cout << sizeof(a) << endl; cout << sizeof(int) << endl; h return 0; */ }