It might be a "dumb" question but i dont know what * do in that code.
ClassA* classa;
ClassA is a class, so what does the * actually do with a class? and how this ?operator? called?
It might be a "dumb" question but i dont know what * do in that code.
ClassA* classa;
ClassA is a class, so what does the * actually do with a class? and how this ?operator? called?
*
does not do anything with a class, it changes the type of the declared variable by making it a pointer:You can add multiple asterisks to make pointers to pointers, pointers to pointers to pointers, and so on:
Note that when the same asterisk is used in an expression (as opposed to a declaration) it "reduces" the level of a pointer, so