0

Pointers purpose in game development

Can I get a few explanations as to how pointers would help in game development?

6th May 2019, 1:27 PM
SmplyCloud -0-
SmplyCloud -0- - avatar
6 Respostas
+ 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?
15th May 2019, 11:17 PM
SmplyCloud -0-
SmplyCloud -0- - avatar
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; }
15th May 2019, 10:04 PM
SmplyCloud -0-
SmplyCloud -0- - avatar
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”
15th May 2019, 10:45 PM
SmplyCloud -0-
SmplyCloud -0- - avatar