Videos
I'm a self taught programmer, learned js.processing from Khan academy, went to java, to python, c++, I thought I was adept, I can do arrays, for/while loops, functions, classes, and bit shifts. So I thought I had this stuff down but come then cgp grey uses the word "pointers" and my confidence is shaken what are these, they don't make any sense?
Tldr: I thought I knew a lot about coding, but I saw a pointer and I don't know what it does
No, a pointer is just a type, not a structure. There are implementations of structures that are types (std::vector, std::map, ...), but a pointer is not.
They are commonly used internally in the implementations of the structures you enumerated, but in itself, a pointer is not a structure.
A pointer is a data type, not a data structure (although some books with rather loose terminology will define fundamental types such as pointers as elements of the larger set of data structures; regardless, a pointer is certainly not an example of an abstract data structure.)
More pertinently, most C++ implementations of abstract data structures such as linked lists, queues, stacks, trees, and so forth will employ pointers as data members; that is, pointers will form part of the implementation; they are not the implementation itself.
As an example, if you're thinking about implementing your own linked list, you might choose to have a doubly linked version, where each element in the list is represented by a node containing pointers to the previous and next nodes:
template <typename T>
class DLList
{
public:
// Lots of things
private:
Node* _head; // Pointer to the head of the list
Node* _tail; // Pointer to the tail of the list
};
Your node might then be implemented like this:
template <typename T>
struct Node {
Node* _prev;
Node* _next;
T _data;
};