0
Pointers purpose in game development
Can I get a few explanations as to how pointers would help in game development?
3 Respuestas
+ 1
~ swim ~ ohhhhhh and in most cases you want to pass by pointer so you dont make a “copy” and waste memory space? and in other cases you might want that that copy?
0
~ swim ~ so instead of me changing the value like
int myVar = 5
int main()
{
myVar = 6
cout << myVar << endl;
}
i’d change it like this?
int myVar = 5
int* ptr = &myVar
int main ()
{
cout << &myVar << endl;
}
0
~ swim ~ ohh and is that how we save memory ? sorry its just that the terms used confuse me like passing by value I dont understand the term “passing”