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 :
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.Code:procedure func(var a:Integer); begin inc(a,10); end; ... a := 10; func(a); // and here i got a = 20
I wonder how to access pointer in that function. Cause i tried like this :
But it changed address of point i guess, beacuse when i checked this array it was like : 0x05000000(...)*somevariable = 5;
*somevariable = 2;