These tutorials are a cut above the rest available on youtube because you speak very clearly and you keep your video short, clean, and to the point. Keep up the great work and thanks!
Pointers are really difficult, and really I can't understand the reason of their existence. Man, if pointers are that difficult why does EVERYONE have them in "beginner" tutorials. This is intermediate to guru, not beginner...
@MrAlditho they are an essential part of programming because they allow you to manipulate variables without having to pass a whole bunch of copies to functons and returning them. All it is a variable that holds an adress of another variable once you wrap your head around it you will understand they take practice
1 question...when we did the thing as...int finger; cout<<finger<<endl; cout<<&finger<<endl; it showed me a code , and when we do it as int finger; int *pointer; pointer= &finger; cout<<pointer<<endl; it shows another code, why is that? thanks, btw. guide is epic! learned more like this than at class on colledge ;)
@nfrancisj2122 creating pointers in c++ is just like using the ref our out type of parameter in c#, it is basically interacting directly with the variable instead of making copies...
@smurfy0706 Well, that seems to be the one thing no one seems to remember to explain - when you pass parameters to functions, the functions normally apply whatever they do to a copy of the input parameter, because FUCNTIONS cannot chanage their parameters, BUT if you use POINTERS instead of the actual thing your function can change what the pointer points to. Without pointer double(2) double(2) will return 4 both times, with pointers it will return 4 and 8 cuz the function "changed" the param
@smurfy0706 Note this explanation is not 100% accurate, but it is the best I can fit inside the comment limit. The whole idea is functions cannot change their parameters, thus if you use an object as a parameter, a different object is output, but if you use the adress or the pointer to that object, the program goes there and does its job on site instead of copying anything, the fixed parameter becomes the pointer, which allows the function to change the actual object that was passed as parameter
@smurfy0706 That is why if you pass the x=2 object as parameter, doubling x twice will return a copied 4 both times, where as if you pass the object with its pointer, the function will double x but instead of returning a copied result 4 it will actually change the value of x to 4, so that the next time double is ran on x, the value of x will get doubled to 8.
@Jarzka1990 Meh i just had the conversation about this: If you can do int something = 10; Instead of int something; something = 10; why couldnt you do int *pointer = &finger; Instead of int *pointer; pointer = &finger;
"finger" is not a pointer, finger (as far as you're concerned) holds a direct value. More specifically, a 32 bit integer.
int *pointer;
"pointer" is a pointer :D. "pointer" holds an ADDRESS. This address points to a 32 bit integer. You can dereference that pointer to access the data stored as the address, using the dereference operator "*pointer".
When you use the ampersand, you get the address of a variable.
when you do not dereference a pointer (you refer to it by its name without using the * operator i.e "pointer"), you will get the its value, which will always be an address, as the pointer holds an address which points to a block of data in memory (an integer in this case).
To help understanding, consider this.
int *ptrMem = new int [256];
ptrMem now points to 256, 4byte integers. So ptrMem holds an address of the beginning of that block.
@ChunFun1 i never understood why people that just script what a funny person says on a youtube video in their comment get the top rated comment almost all the time
@Zainub13 A tip on pointers.Pointers must be initialized when declared with a valid address or set it to null ( 0 ).A pointer unlike other varibles, allocates memory for an address ( 4 bytes on 32 machines and 8 on 64's ) not the type it points to! I might make tutorials with a little detail.If a pointer is not assign an address or 0, it will become a "wild" pointer( they are dangerous! ).
@ZipArray It's almost a full year and i already know how to do templates! I got this good by reading a book( only 50$ ).I also study in great detail.I could do tutorials in detail, but i am not ready yet! But i recommend you get a book( you won't regret it ).
Because online tutorials my not explain much detail.Pointers were basic for me so i could do things like polymorphism and memory control!
@candychandelier It's better than some.But you will need another book called ivor horton's visual C++ 2010, if you want. It teaches you some stuff that's not in that one!
Like "function pointers" and how to use visual studio 2010! It also teaches you how to make GUI's(Graphic User Interface)!
@Poneivanfa well when you first start out programming you will probably be using a very high level language like VB, C# or Java but pointers are a more advanced subject of Computer Science with a pointer you can not only access a variables value with its memory address but you can also
@Poneivanfa request more memory from the free store and free up memory as well so you can access more memory at runtime instead of before execution an example of what you would use this for would be say if your making a game and you want to translate it to an eastern language western languages require 1 byte of information
@Poneivanfa per character to store data but most eastern languages require 2 so you would need to use pointers to access the free store to request more room for your data
@Testingpointer1 precisely and when I say free up the memory I mean using the delete and new keywords you can request more memory from the free store if your using the new keywork but you need to free up that memory before you can reassign a value which is what the delete keyword is for or you can unintentionaly cause a
@ANXIOUS117 so to be exact memory leak is is cause of adding a value to a memory that already have one? and that memory you are talking about is like an egg tray where in each slots(every slot is a memory) has named in hexadecimal code?
@Testingpointer1 a memory leak is when you can no longer access the value of a variable you declared because you forgot to free up the memory when you were done using it you can get unexpected results or your project can crash you will not be able to access that memory until execution of your project stops
@ruscris2 actually short int stores between -32,767 and +32,767, int will store between -65,535 and +65,535 and long int will store between -2,147,483,647 and +2,147,483,647. char can store alphnumeric characters that includes a single letter, number, or certain symbols
@ruscris2 actually short int stores between -32,767 and +32,767, int will store between -65,535 and +65,535 and long int will store between -2,147,483,647 and +2,147,483,647. char can store alphnumeric characters that includes a single letter, number, or certain symbols
@MAGStation int is whole numbers, in java, double is with decimals, it may be slightly different in C++ though, char is something to do with arguments and numbers or something like that i think :)
@TheMetalmaggot666 char is a byte of information or 8 bits. It's commonly used to represent ASCII characters as no characters goes above 127. An unsigned char can store from 0 - 255, a signed char can store negative numbers using the twos compliment, i.e -128 to 127
I kinda like these tutorials better than XOAX's, even though his looks a little more professional, he speaks as though he's trying to teach someone who already knows another programming language, while thenewboston actually makes things clear to people without any experience (talking to us like we're stupid, if you will). It's easier to follow.
In the most general way possible, to access the memory directly. If you program in assembly, try to do it without accessing memory, then you will realise why we NEED pointers.
Primary use is for making data structures (try making a single linked list), all software have data structures; secondary the pointer data type is used as a data type with the API (i.e. gateway/"bag of functions") to devices through USB, Ethernet, Blue Tooth, etc.
pointers are useful on returning variables to the main function as such
taetantantan 1 week ago
These tutorials are a cut above the rest available on youtube because you speak very clearly and you keep your video short, clean, and to the point. Keep up the great work and thanks!
ihateyourusernames 2 weeks ago
Pointers are really difficult, and really I can't understand the reason of their existence. Man, if pointers are that difficult why does EVERYONE have them in "beginner" tutorials. This is intermediate to guru, not beginner...
MrAlditho 1 month ago
@MrAlditho they are an essential part of programming because they allow you to manipulate variables without having to pass a whole bunch of copies to functons and returning them. All it is a variable that holds an adress of another variable once you wrap your head around it you will understand they take practice
bondservant4Him 1 month ago
the first one shows the value of finger, and the second one shows the address of finger
bondservant4Him 1 month ago
1 question...when we did the thing as...int finger; cout<<finger<<endl; cout<<&finger<<endl; it showed me a code , and when we do it as int finger; int *pointer; pointer= &finger; cout<<pointer<<endl; it shows another code, why is that? thanks, btw. guide is epic! learned more like this than at class on colledge ;)
AlphMarco 1 month ago in playlist C++ Programming Tutorials from thenewboston
Address Operator just SHOWS where your data is stored and Pointers is a variable that HOLDS the adress in your memory ..
ijustlovedogs13 1 month ago
@ijustlovedogs13 this based on my understanding
ijustlovedogs13 1 month ago
thx bucky one of your example came in my ex same love you
laymonah1 1 month ago
I used to be a programmer like you, then I took a -> in the knee.
Umbranox90 2 months ago
What i don't get is:
cout << pointer;
sure we could do this, or we could just do
cout << &finger;
Ezmbro 2 months ago
@Ezmbro Then, every time you use pointer, you dont have to type "&finger", just "pointer".
Boeing737Channel 2 months ago
@Ezmbro what don't you get about those two statements?
brawl313 1 month ago
i still dont get the point of the asterisk, wouldnt it do the same either way?
NTComputer86 3 months ago
humor + learning = epic :D
mick5000x 4 months ago
explanation was crystal clear
Valkayre 4 months ago
Comment removed
HappyCampingCorner 5 months ago
sloppy code alert
Thevideoclown 5 months ago
you could just use: "cout << &finger;"
Yikak4 5 months ago
"so this will make a lot more sense when we use it to do something useful" LOL
YZB25 5 months ago
why dont you use
int finger=10,eyes=2;
it kinda bugs me lol
GameVidsxX 6 months ago
@GameVidsxX Because its easier to understand/read that way.
Altair565 5 months ago
watch /watch?v=Rxvv9krECNw if you still dont get it. It really helped me.
thesickbeat 6 months ago
ia this similar to iterators
kevkev797 8 months ago
What is the point (no pun intended) of pointers? It seems you can do just as much without them.
Mustang5Speed 8 months ago
@Mustang5Speed when you want to change an original variable from a function is the biggest use
bondservant4Him 8 months ago
@bondservant4Him Thanks, you answered my only question
VictoriusDawn 7 months ago
lost a bit... why use pointers? can't I just say: "pointer = finger" instead of pointing to the address and then getting the value of finger?
Just a bit confused
thanks Great Tuts
nfrancisj2122 9 months ago
@nfrancisj2122 creating pointers in c++ is just like using the ref our out type of parameter in c#, it is basically interacting directly with the variable instead of making copies...
martmelee 8 months ago
@nfrancisj2122 although not exactly the same, it's just a comparison but don't get it as if they were the same...
martmelee 8 months ago
what if you need a pointer for your pointer????
Randude14 9 months ago
@Randude14 That's called a double pointer.
CPUhacker24 8 months ago
cool Teaching bro
losdruid 9 months ago
You are awesome man. Finally a tutorial that actually helps
thenewguynamedted 9 months ago
he calls it a star...
DEAL WITH IT
SpooderW 9 months ago 11
pFont->DrawTextA(NULL, items[i], -1, &pRect, DT_NOCLIP, clr);
for god's sake Bucky teach them some D3D =D
bunnykillsu52 10 months ago
wtf mine is at the same adress
BLANKMEMORYDATA 10 months ago
I can't understand why do we need the pointers?
smurfy0706 10 months ago
@smurfy0706 yer aint it easierbto just write cout << "&finger" << endl;
than to go and point to it
my mum says its rude to point anyway
do u lyk smurf vill or u just create a wacky cl name
tinyteemayster 10 months ago
@smurfy0706 Well, that seems to be the one thing no one seems to remember to explain - when you pass parameters to functions, the functions normally apply whatever they do to a copy of the input parameter, because FUCNTIONS cannot chanage their parameters, BUT if you use POINTERS instead of the actual thing your function can change what the pointer points to. Without pointer double(2) double(2) will return 4 both times, with pointers it will return 4 and 8 cuz the function "changed" the param
avrilinblood 10 months ago
@smurfy0706 Note this explanation is not 100% accurate, but it is the best I can fit inside the comment limit. The whole idea is functions cannot change their parameters, thus if you use an object as a parameter, a different object is output, but if you use the adress or the pointer to that object, the program goes there and does its job on site instead of copying anything, the fixed parameter becomes the pointer, which allows the function to change the actual object that was passed as parameter
avrilinblood 10 months ago
@smurfy0706 That is why if you pass the x=2 object as parameter, doubling x twice will return a copied 4 both times, where as if you pass the object with its pointer, the function will double x but instead of returning a copied result 4 it will actually change the value of x to 4, so that the next time double is ran on x, the value of x will get doubled to 8.
avrilinblood 10 months ago
Dude you are awesome! This is the first vid of yours that I have seen and I already feel like I can really learn from you.
Iridium237 10 months ago
Imagine creating a coil by those spaces! That's engineering...
TheLuotutin 11 months ago
This has been flagged as spam show
@mylifeis2coolcmc2
of course,
0 1 2 3 4 5 6 7 8 9 A B C D E F
from 8 to C
Its four bytes away.
HexaDecimal means that you add up to 16 for each "10"
deathbyaccident 11 months ago
This has been flagged as spam show
@mylifeis2coolcmc2
of course,
0 1 2 3 4 5 6 7 8 9 A B C D E F
8 9 A B C |======| 4
from 9 to C
Its four bytes away.
HexaDecimal means that you add up to 16 for each "10"
deathbyaccident 11 months ago
This has been flagged as spam show
@mylifeis2coolcmc2
of course,
0 1 2 3 4 5 6 7 8 9 A B C D E F
8 9 A B C |======| 4
from 9 to C
Its four bytes away.
HexaDecimal means that you add up to 16 for each "10"
deathbyaccident 11 months ago
@mylifeis2coolcmc2
of course,
0 1 2 3 4 5 6 7 8 9 A B C D E F |======| 4
Its four bytes away.
HexaDecimal means that you add up to 16 for each "10"
deathbyaccident 11 months ago
two ints 2 lines away yet it gives me
001AF6FC for eyes and
001AF708 for fingers!
mylifeis2coolcmc2 11 months ago
hex: 22FF44
dec: 2293572
I used a calculator :3
TheScars75 11 months ago
learn c++ coding from this site pcfunia.com
pcfunia 11 months ago
@pcfunia BUCKYS BETTER YOU SUCK!
UnitedGB 11 months ago
why did it jump from c to c++?
Quphe 11 months ago
@Quphe c++ includes all the features of c plus additional features too
pcfunia 11 months ago
@Quphe .....*points to title of video*......
UnitedGB 11 months ago
@Quphe it was always C++......
TheSoulAssassin20 11 months ago
Good quality on your videos...
Thats nice when you want to see the code.
Zillo91 11 months ago
Comment removed
noideayo 1 year ago
This has been flagged as spam show
i really appreciate ur tutorial thanks
TheHammasali 1 year ago
i really appreciatiate ur tutorial thanks.
TheHammasali 1 year ago
how fast can you say c++ five times!! great tutorial thanks
gardenstateboss 1 year ago
c++ tutorial???
Mexicouger 1 year ago
you could just use: "int *pointer = &finger;"
FrozenMasters 1 year ago 34
@FrozenMasters that doesn't work because the memory address isn't an int try it.
Zeller002 8 months ago in playlist C++ New Boston
@FrozenMasters that doesn't work because the memory address isn't an Intiger try it.
Zeller002 8 months ago in playlist C++ New Boston
@Zeller002 it works as long as you declare finger as an int
bondservant4Him 7 months ago
@Zeller002
If you can do
int something = 10; Instead of
int something;
something = 10;
why couldnt you do
int *pointer = &finger; Instead of
int *pointer;
pointer = &finger;
FrozenMasters 6 months ago
@FrozenMasters you can do that
bondservant4Him 6 months ago
This has been flagged as spam show
@bondservant4Him Why the fuck does then this dumbfuck say i can't:
@FrozenMasters that doesn't work because the memory address isn't an Intiger try it.
Zeller002 1 month ago in playlist C++ New Boston
FrozenMasters 6 months ago
@FrozenMasters Actually you should allocate it first:
int* pointer = 0;
pointer = &finger;
Jarzka1990 6 months ago
FrozenMasters 6 months ago
dont understand the difference from using pointer and using &finger..
for example cout << pointer shows the same exact thing as cout<<&finger.
What's the point? (no pun intendeD)
ObliviuxProductions 1 year ago 2
@ObliviuxProductions Let's get this straight.
int finger;
"finger" is not a pointer, finger (as far as you're concerned) holds a direct value. More specifically, a 32 bit integer.
int *pointer;
"pointer" is a pointer :D. "pointer" holds an ADDRESS. This address points to a 32 bit integer. You can dereference that pointer to access the data stored as the address, using the dereference operator "*pointer".
When you use the ampersand, you get the address of a variable.
cplusplusish 1 year ago
@ObliviuxProductions
further more.
int *pointer;
when you do not dereference a pointer (you refer to it by its name without using the * operator i.e "pointer"), you will get the its value, which will always be an address, as the pointer holds an address which points to a block of data in memory (an integer in this case).
To help understanding, consider this.
int *ptrMem = new int [256];
ptrMem now points to 256, 4byte integers. So ptrMem holds an address of the beginning of that block.
cplusplusish 1 year ago
@ObliviuxProductions So you can still use finger with the value of 10 and not the memory location.
onlyoneskiez 1 year ago
Wait, declaring your point as int *pointer; is bad practice. It's better to declare the value null so it doesn't point to something random.
eldspartan063 1 year ago
I'm gonna name my pointer,........pointer........coz i am that creative.. LOL
ChunFun1 1 year ago 122
@ChunFun1 i never understood why people that just script what a funny person says on a youtube video in their comment get the top rated comment almost all the time
tomek123kotek 8 months ago
Thanks for this, God bless
Luke13verse5Repent 1 year ago
thanks Greg
Decklanx 1 year ago
great tutorials... but does it bug anyone else as much as me that it isn't indented and that last bracket is... OCD I can't help it.
Proinventor91 1 year ago
You are so good, keep it up!
aXque 1 year ago
I watched your tutorials from the 1st tutorial -- and might I say -- the explanation is simple and sooooooo helpful! Thank you!!!
And just an honest suggestion -- we could all do without the cockiness
=)
Zainub13 1 year ago
@Zainub13 A tip on pointers.Pointers must be initialized when declared with a valid address or set it to null ( 0 ).A pointer unlike other varibles, allocates memory for an address ( 4 bytes on 32 machines and 8 on 64's ) not the type it points to! I might make tutorials with a little detail.If a pointer is not assign an address or 0, it will become a "wild" pointer( they are dangerous! ).
BlackHeavenSymphony 1 year ago
@BlackHeavenSymphony Good explanation, glad some one pointed this out!
ZipArray 1 year ago
@ZipArray It's almost a full year and i already know how to do templates! I got this good by reading a book( only 50$ ).I also study in great detail.I could do tutorials in detail, but i am not ready yet! But i recommend you get a book( you won't regret it ).
Because online tutorials my not explain much detail.Pointers were basic for me so i could do things like polymorphism and memory control!
BlackHeavenSymphony 1 year ago
@BlackHeavenSymphony
What book did you read?
MrOsamaful 1 year ago
@MrOsamaful "Sam's teach yourself C++"!
BlackHeavenSymphony 1 year ago
@BlackHeavenSymphony
It seems that it's a very popular and good book. I think i may buy it :P Thx.
MrOsamaful 1 year ago
@BlackHeavenSymphony I have that book, I'm reading it now, but I dislike how it's organized. :\
candychandelier 1 year ago
@candychandelier It's better than some.But you will need another book called ivor horton's visual C++ 2010, if you want. It teaches you some stuff that's not in that one!
Like "function pointers" and how to use visual studio 2010! It also teaches you how to make GUI's(Graphic User Interface)!
BlackHeavenSymphony 1 year ago
mine says 0x28ff44
maybe cuz i'm 64 bit
super0393 1 year ago
this could not have been explained easier !!
pktracer5 1 year ago
Nice tutorial and very well explained.
lukie254 1 year ago
Salam..Peace be upon you and your family...It is indeed the simplest and easiest way ...thanks bro n bless you.
HeavenlyJustice4All 1 year ago
why cant you just outpu &finger ??
god4506 1 year ago
@god4506 we're expanding and using pointers.
meliefore 1 year ago
named mine "MoNkEyTwOtHiRtYThReE" because im THAT creative
ztsb45 1 year ago
ohh men your amazing....!!
tnank you very much
iignore08 1 year ago
excellent work dude, complete newb at programming and i feel like im leaps and bounds better after watching your first 16 videos you rock :)
Gamerdad81 1 year ago
Wow i think i got it.
Ok so, the pointer is pointing to whatever value the 'finger' variable holds even if it changes value, is that right?
master10123 1 year ago
is c++ ur pet?? naomi??
biplav32 1 year ago
Pointers in a nutshell: Pointers point to memory addresses
FOOFlGHTERS 1 year ago
thanks ANXIOUS117
Poneivanfa 1 year ago
* is actually called a wildcard :)
samjddowlinggmail 1 year ago
whats the point of this tutorial of memory storage???
im new to CS
Poneivanfa 1 year ago
@Poneivanfa well when you first start out programming you will probably be using a very high level language like VB, C# or Java but pointers are a more advanced subject of Computer Science with a pointer you can not only access a variables value with its memory address but you can also
ANXIOUS117 1 year ago
@Poneivanfa request more memory from the free store and free up memory as well so you can access more memory at runtime instead of before execution an example of what you would use this for would be say if your making a game and you want to translate it to an eastern language western languages require 1 byte of information
ANXIOUS117 1 year ago
@Poneivanfa per character to store data but most eastern languages require 2 so you would need to use pointers to access the free store to request more room for your data
ANXIOUS117 1 year ago
hey does it mean if you change the value of 10 it will also mean that the hexadecimal number that was printed will also change?
Testingpointer1 1 year ago
@Testingpointer1 no that hexadecimal number is the variables memory address the only way it might change is if you free up the memory
ANXIOUS117 1 year ago
@ANXIOUS117 so its like just the name of a container is that it?
Testingpointer1 1 year ago
@Testingpointer1 precisely and when I say free up the memory I mean using the delete and new keywords you can request more memory from the free store if your using the new keywork but you need to free up that memory before you can reassign a value which is what the delete keyword is for or you can unintentionaly cause a
ANXIOUS117 1 year ago
@Testingpointer1 memory leak
ANXIOUS117 1 year ago
@ANXIOUS117 so to be exact memory leak is is cause of adding a value to a memory that already have one? and that memory you are talking about is like an egg tray where in each slots(every slot is a memory) has named in hexadecimal code?
Testingpointer1 1 year ago
@Testingpointer1 a memory leak is when you can no longer access the value of a variable you declared because you forgot to free up the memory when you were done using it you can get unexpected results or your project can crash you will not be able to access that memory until execution of your project stops
ANXIOUS117 1 year ago
@ANXIOUS117 yeah i get it now, thanks dude,
Testingpointer1 1 year ago
@Testingpointer1 yep no problem if you have any more questions regarding pointers just ask
ANXIOUS117 1 year ago
It seems to like you like human and it´s anatomy.
TheHJman 1 year ago
the previous two vids were a bit blurry, but this one is great in 480
vladimir0B 1 year ago
thenewboston - you rock man!
WikiPeoples 1 year ago
Why did u upgrade to vista! It sucks !!!!!! I love xp
boringgirl123 1 year ago
@boringgirl123 You havent seen windows 7 then i guess :/
FOOFlGHTERS 1 year ago
tutorial suppose to make it easy not confuse and this guy is superb
mgtuta 1 year ago
Whats the diffrence between:
int
double
char
can you please help me with that?
MAGStation 1 year ago
@MAGStation I will tell you: int can store numbers between: -2.147.148.648 and 2.147.148.648.
double can store real numbers (2.3 , 45.54) that int cannot support
char store's chars
and long stores very long numbers between -10 billions and 10 billions
ruscris2 1 year ago
@ruscris2 actually short int stores between -32,767 and +32,767, int will store between -65,535 and +65,535 and long int will store between -2,147,483,647 and +2,147,483,647. char can store alphnumeric characters that includes a single letter, number, or certain symbols
ANXIOUS117 1 year ago
This has been flagged as spam show
@ruscris2 actually short int stores between -32,767 and +32,767, int will store between -65,535 and +65,535 and long int will store between -2,147,483,647 and +2,147,483,647. char can store alphnumeric characters that includes a single letter, number, or certain symbols
ANXIOUS117 1 year ago
@MAGStation int is whole numbers, in java, double is with decimals, it may be slightly different in C++ though, char is something to do with arguments and numbers or something like that i think :)
TheMetalmaggot666 1 year ago
@TheMetalmaggot666 char is a byte of information or 8 bits. It's commonly used to represent ASCII characters as no characters goes above 127. An unsigned char can store from 0 - 255, a signed char can store negative numbers using the twos compliment, i.e -128 to 127
FOOFlGHTERS 1 year ago
isn't this the same as the15:th tut?
swemovimaker 1 year ago
I think the location of using namespace std does matter. For example:
int main()
{
using namespace std;
cout << "Standard Namespace";
using namespace myTestNamespace;
myTestNamespaceFunction();
};
xXScissorHandsXx 1 year ago
Comment removed
xXScissorHandsXx 1 year ago
this is the most detailed series of c++ on youtube! 5 stars and i subscribed...keep going!
Molbs100 1 year ago 2
don't you normally put using namespace std outside main? Thats the way i learned it. probably doesnt make a differece
johnnyc130 2 years ago
Comment removed
Some1YouDontKnowYet 2 years ago
yea its the same, but someone told me its better to place it inside, but dont ask me why lol
HipHop4evahh 2 years ago
@johnnyc130 If it is inside a function, then that namespace is local to that function. If it is outside of main, it is global.
ZGalhardo 1 year ago
how would you hook this into a process so you are searching for the values in another process on your computer?
VintageWoWOwner 2 years ago
I kinda like these tutorials better than XOAX's, even though his looks a little more professional, he speaks as though he's trying to teach someone who already knows another programming language, while thenewboston actually makes things clear to people without any experience (talking to us like we're stupid, if you will). It's easier to follow.
Archlvt 2 years ago
from the last tutorial I found out that boolean variables are the only variables that don't take up just 4 bytes, how is it possible?
supergenius1994 2 years ago
Can you go:
int *pointer = &finger;
instead of:
int *pointer;
pointer = &finger;
?
cbxsn 2 years ago
yes..
lizihao1130 2 years ago
@cbxsn
yep
NinjaBearFighter 2 years ago
yes
supergenius1994 2 years ago
yes
gordo4444 2 years ago
what is the point of using a pointer? :P
nickrohn93 2 years ago 24
This has been flagged as spam show
@nickrohn93
"what is the point of using a pointer? :P "
In the most general way possible, to access the memory directly. If you program in assembly, try to do it without accessing memory, then you will realise why we NEED pointers.
0121ryanh117 2 years ago
@nickrohn93 accessing memory within the free store thats when pointers really become usefull
ANXIOUS117 1 year ago
@AXIOUS117 omg gilbert, anyway i know that now. at the time i always avoided * and &. Although it is also helpful for garbage collection.
nickrohn93 1 year ago
@nickrohn93 yep very true
ANXIOUS117 1 year ago
@nickrohn93
Primary use is for making data structures (try making a single linked list), all software have data structures; secondary the pointer data type is used as a data type with the API (i.e. gateway/"bag of functions") to devices through USB, Ethernet, Blue Tooth, etc.
AndrianGA 1 year ago
@nickrohn93 to point something out....
daeheadshot 11 months ago
best c++ tutorial giver i've found yet. everyone else sounds like such a plug, can't even listen to em. thanks man
Crazykid0707 2 years ago
So, why would you make a pointer, if you can just make a normal variable? :D
lucas199400 2 years ago
I had wondered that for a long time, here is what I came up with:
int a=random_value, b=random_value;
int *pointer=a+b;
//now it doesn't matter if a or b change, "pointer" will always be equal to a+b
supergenius1994 2 years ago
o ye 5 stars nice tut
dillon4321 2 years ago
dood use getchar(); not system("pause");
much more efficient to use a function native to C instead of an OS specific function call
dillon4321 2 years ago
@dillon4321 Another thing is, OS specific function calls aren't portable. ;)
DIABLOVT12 2 years ago
ye...that's why I said OS specific lol
dillon4321 2 years ago
lol you got an amazing site :D are you still working on it ? btw thanks a million times for the pointers tutorial :D !!
NFSprostreet98 2 years ago
hey man thanks again for niceeeeee video , u're the best :D
samdadayou 2 years ago
So, when you quit the program, and start it up again.. Will it remember the variable?
lucas199400 2 years ago
no the variables are gone
MrPello1 2 years ago
No it does not i hope.
zamliman 2 years ago
No, the variables and everything that you did in the program are lost, unless you save it to a file before closing the program.
Aggregate02 2 years ago
this shit was annoyingly easy...
TheReasonWhyGuy 2 years ago
so was your mother
ILoveDogsandHarleys 2 years ago
This comment has received too many negative votes show
:D
I know, you kept me up last night, I didn't think you like my moms cock that much!
TheReasonWhyGuy 2 years ago
easy to understand, good tutorial
hoyun 2 years ago
i get 0x22ff54. why is it different?
Tarzanlovesujane 2 years ago
your's is in a different location that his is
rubik294 2 years ago