Hey, im working with c++ for some time. And i wonder how to send there pointer and use in function.
In delphi i could do something like this :
Code:
procedure func(var a:Integer);
begin
inc(a,10);
end;
...
a := 10;
func(a);
// and here i got a = 20
In c++ i noticed it works and u don't need to type 'var' (btw i can be dangerous, when i forget to not manipulate on varaible). But it's not work for me when i want do it by function which i have declared in class saved as header. That's why i need pointer to array.
I wonder how to access pointer in that function. Cause i tried like this :
*somevariable[0] = 5;
*somevariable[0] = 2;
But it changed address of point i guess, beacuse when i checked this array it was like : 0x05000000(...)