01.cpp:26: error: extra qualification ‘main(int, char**)::tablica::’ on member ‘pobierz’
Changing that line to
int pobierz(int pozycja)
fixes that and it compiles.
On running, it segFaults. This means you are trying to use memory that is not yours.
Running it under a debugger reveals the following line to be at fault:
t[pozycja]=wartosc;
(gdb) print pozycja
$1 = 2
pozycja is found to equal 2.
Upon examinig the code, t is found to be an int pointer that you have never set. It is pointing at some random memory, so when you try to write to it, you are writing over some random memory. This is bad. The operating system stops the program. To fix this, you must make that pointer point at some memory that actually is yours.
You need to understand what a pointer is and what an int is, and how a pointer to an int is not the same thing as an int. If you don't understand the difference, you will make this mistake over and over again in different forms.