4
I’m trying to learn C++ on the Internet, I understand more or less what pointers are but I don’t see a utility, I don’t know anything about C++ I just don’t want to go over this subject, I did a test that I think should work, to see the speed of the pointers vs the normal variables.
Because in both tests the speed is practically the same if one uses pointers and the other does not?
You’re not seeing their usefulness because you’re tracking bad material, so you’re probably learning a lot of things the wrong way. Now I’m running out of time but the answer you’ve gotten so far has not helped much. What you have most is wrong or bad information on the internet. There was a time when that didn’t happen here, but it changed. See help: http://answall.com/tags/c%2b%2b/info More questions that might help: http://answall.com/questions/tagged/ponteiro See this one: http://answall.com/q/56470/101. Pointer is a key concept for languages like C++.
– Maniero
Could [Edit] the question and include the code instead of images? It is too bad to visualize what is written accessing the site by mobile.
– Renan Gomes
Thanks for the links. And I don’t need to put the code anymore because @bfavaretto said that array are pointers so the codes are equal, call a function with Pointer.
– mbegginer
@mbegginer What the fact of array being pointers has to do with you being able to post the code or not?
– Victor Stafusa
@Victorstafusa, I think he meant, he’s already figured out what he wanted. But mbegginer what bfavaretto meant, is that when you pass an array to Pointer, you are passing a Pointer to the first element of it... Pointer would point to the first element of the array.
– Silva97
Yes, thank you. I thought that so the function would have to copy the entire array, like the "999999 1ns" and then add 1 to the copy and show the result, kkkk but not by the way. And I’m using linuxLive and I don’t have the code anymore it was just a dumb test.
– mbegginer