   Need a book or tutorial that goes real deep into pointers.
  I''ve been searching around amazon and the net but I really cant seem to find good tutorials that go that far into pointers. Some are just like blah blah, and expect people to get it.  I took a year long computer science class at my high school last year and we went over pretty much everything except pointers which I really hate.  Every where I look theres pointers and I feel I cant move to the next "level" until I get them down.  I really need a good book that goes into pointers,pointers to functions,pointers to classes, etc.  The whole deal.  Any help would be really appreciated. Thanks 
  I have a copy of this: C++ Pointers & Dynamic Memory Management  By Michael C. Daconta. It''s pretty good I suppose. ;  For regular pointers: www.cplusplus.comFor function pointers: www.function-pointers.org;  First off all, drop the pointers is hard attitude. As long as you are wearing it you will never learn pointers.Pointers are easy, very easy to understand. Think of pointers as variables that contain the address of another variable. Now everything you do with this pointer is the same thing as doing it with the real variable, think of the pointer as a synonym.Ex:int  myVariable;int* myPointer = &myVariable;Now you can modify the above variable myVariable in two different ways, either by the pointer or directly by the variable: myVariable = 10;*myPointer  = 10;The star infront of the myPointer makes sure that it is the actual variable you want to change which the pointer is pointing at and not the pointer itself. For example this:myPointer = 10;would lead to that the pointer would point to address 10.And if you look up a bit in this explanation you can see the following:int* myPointer = &myVariable;so remembering that myPointer = 10; will make myPointer point to address 10, we can simply interpret that the & before the variable name must be the address of the variable, which is the case.Here's another way of assigning a pointer the address of a variable:int  myVariable;int  myVariablesAddress = &myVariable;int* myPointer = myVariableAddress;Hope some of that stuck Anyways, a good way learning pointers is using std::cout, ie:int  myVariable = 10;int* myPointer  = &myVariable;std::cout << myVariable << std::endl;std::cout << myPointer << std::endl;std::cout << *myPointer << std::endl;Another way of thinking of pointers is thinking of them as unsigned long's which just contains the address of the memory location where a variable exists. Pointers are not difficult!edit:oh and before screaming at me saying that this is the worst explanation ever, it is 5am here :/ [edited by - angry on July 30, 2003 11:10:58 PM];  Try this: its a GOOD introduction, (IMHO);  Yea im sorry I didnt really make myself that clear.  I have read up on basic pointers on the net. I understand that part of pointers. The basic stuff. The stuff im getting stuck on is like the when it gets to using foo->bar and foo->wha->bar->blah . And sometimes i''ll look and its like (*foo) = (*bar) or *(foo)(*bar) ..Or when its using the this->pointer . And some like this *(pdata+1) = *(pdata+2) . It gets really confusing.  But thanks anyway angry for the tutorial.  But what im really getting stuck on is the stuff i have shown above.[edit] I looked the site that hehenoobhehe gave me. It has some good topics pointers to functions and pointers to structs. I think im starting to understand now but are pointers to classes pretty much the same as pointers to structs? Thanks again ;quote:Original post by Archaikz  [edit] I looked the site that hehenoobhehe gave me. It has some good topics pointers to functions and pointers to structs. I think im starting to understand now but are pointers to classes pretty much the same as pointers to structs? Thanks again   Yeah more or less. There''s no difference between using structs and using classes other then the keywords themselves and default access specifiers. So everything that you can do with classes, it can be done using structs as well.As for pointers, the thing that I found to help me out is to remember that the name of the pointer itself is just holding a memory address. To get the stuff in that address you use *pointername. And one other piece to keep in mind also is that ''->'' is used to access members of a struct/class where you''re using pointers to a class/struct. You can access a member of a just by using the period too but you''ll need to remember in the case of pointers you''ll need to use (*pointername).memberIf you trace through the parts of the pointers you don''t understand using those above points then you should be able to see what is going on visually inside your head. I think the problem you''re having is that you can''t get use to them especially when they go a few levels deep in pointers. It took me a while to get the pointers to pointers too but the trick is to just practice and to use them. You''ll get use to them eventually   --{You fight like a dairy farmer!} ;  I appreciate all the help from everyone; thanks alot.. I think i''ll just keep reading up on them and practice using them like you said.  I''ll eventually get them I guess.  I think the problem is not the syntax its why to use them. It just seems stupid to do Player *p1; p1 = new Player;p1->health = 100;instead of sayingPlayer p1;p1.health = 100;it just seems like more to type. Maybe im just not getting the full functionallity of them yet. Well again thanks for the help. ;  I think assembly explains pointers far better than C.C uses * -> & ., assembly just uses [].[data] <<<< Look like a box filled with data doesn''t it?So applying the idea to C:int myVariable = 512;makes a box(memory) filled with the value 512[512]int* myPointer = &myVariable;Makes a box filled with the address of myVariable.[1000]   ===  1000[512]int* myotherPointer = &myPointer;Makes a box filled with the address of myPointer.[2000] === 2000[1000]int* myPointer = &myVariable;int* myotherPointer = &myPointer;Both these lines look AT the box.int* myPointer = myVariable;[512] myPointer contains value contained in MyVariable.int* myotherPointer = myPointer;[512] myotherPointer contains value contained in MyPointer.Both these lines look IN the box.I know this is abstract.  Pointer can be viewed as a question of are you looking AT the box, or IN the box.;  Archaikz:I felt the same way. The truth is that it''s usually better not to use a pointer if you can (unless you really know what you are doing) and save yourself the trouble. If you don''t see why you should use a pointer then don''t use one . It''s hard to explain why they are needed in a real situation, but if one is needed then it will be obvious. 