Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –

Buckys C++ Programming Tutorials – 38 – Introduction to Pointers
by
Tags:
Comments
41 responses to “Buckys C++ Programming Tutorials – 38 – Introduction to Pointers”
-
Thanks bro
-
Good lord why do I waste my time with my courses E-text when I can just watch these videos.
Literally had no idea what the hell my E-text was talking about when it got to pointers, now I see it's so simple. -
So, basically a pointer is an address of an existing variable? This confused me. Someone told me to use pointers for better performance, so the program doesn't have to move large chunks of memory, but can just point to existing memory. Makes sense…
-
But why creating a pointer and setting it equal to the adress if u can acces it already via &fish
-
Nice tutorial. However, the most misleading part of the pointer is the way the pointer type is written. int *fish gave me the impression that *fish is the type of int, once I realized that is not the case, I started to write it as int* fish. The pointer type is int*. This dragged me years to really understand pointers. Now I really appreciate those who write pointer type as int* fish.
-
hey Bucky! you are a legend man I think I should skip my next course of c++ and get those things clear from your tutorials you teach way better than my teacher who just keeping reading slides slides and more slides.
-
cool bruz!!
-
Thank you for the tutorial 🙂
-
wtf
-
I know the syntax of pointers but I cannot understand when I shall use them or why I should do it
-
Thanks for the tutorial..its pretty cool
-
Thank you for your work on this tutorial! Great job!
-
Really Awesome
I got confused from lynda's explanation but understood it from you.
You are great, bucky -
Thanks for the explanation. This was very helpful!
-
Bucky, or anyone for that matter, I understand how to use pointers, but what are they for? Do they have a practical use for something you didn't explain?
-
I don't get it..
If we can access address with "&" sign before the variable then why we need pointers for the same case..? -
@@ why didn't chu explain it with array instead ;_;?
-
This is bring back Vietnam flash backs of my "hacking" days.
-
First time the output was 0x28ff1c but the second time he run the program it was 0x28ff18.. Does any body know why?!
-
Thanks friend, good tutorial.
-
wull… u have da best variable names thx boston
-
Can u do a video for algorithms??
-
pretty weird huh:)
-
I've been going through SoloLearn to learn C++. I got to this point like a breeze and then pointers hit me like a brick. This video was VERY helpful.
It takes a combination of media to really grasp the concept. -
hey bucky what would be a good c++ book for beginners
-
PRETTY COOL HUNH?
-
Thank's
-
is there a difference between
int* intPointer; //and
int *intPointer; //??In other words, does the positon of the asterisk(*) make a difference or do they look the same to the comp?
-
Hey, great tutorial, Bucky! Wanted to learn what a pointer was for my Udemy course, now I do. Thanks!
-
Whenever he compiled his code, it would show up in a command window screen. How can I get that? When I compile, the screen pops up for 2 seconds and then closes on its own. How can I make it so I close the command window with my code when I hit a key?
Thanks
-
codeblocks? 😀
-
awesome! thanks!
-
But… whats the point?…
-
thank you, Bucky! Your videos are always helpful to me. 🙂
-
what can i do with pointers to pointers?
-
So what's the point of this? Why can't I just do cout << &fish?
-
can anyone tell me y we use pointers? on what circumstances……
-
It's important to note that any variable you make is just a piece of memory that holds some value, and you have the address to that memory. It doesn't matter if it's a variable or a pointer or something else, because this is simply how computers work.
When you create a local/temporary variable, you're simply giving all the responsibility to the compiler, to ask for some memory to store a value, and to free that memory when the variable goes out of scope. Pointers can be used to do the same thing, and the main difference is that the responsibility and control over the same process is given to you instead of the compiler (or the operating system). That gives you more freedom, but also makes it possible for you to get bugs, for example.
Apart from variables being simple to use, the fact that they are generally perfectly safe from memory bugs is the main reason they exist, and the reason you should always use simple variables instead of pointers unless you need to use pointers, for some reason.Also note that pointers are generally slower, since jumping between different locations in RAM means you're not using ther cache memory, and that is the largest (!) performance problem in modern software. Using pointers doesn't absolutely have to mean you get this problem, it's about jumping to differnet places in RAM, not the actual use of pointer. It's just that pointers will often do this.
-
#include<iostream>
using namespace std;int main( )
{
cout << " We need more people like you to keep stuff always simple" <<endl;return 0;
}Guess what's the output?
-
if i write this in c++ :
int *p;
*p=2;
cout<<*p<<endl;
why my program crashes? -
Thank you, amazing tutorials!
Leave a Reply