Type* name > Type *name
Type* name > Type *name
Type * name
Now would you kindly fuck off
A man of culture
You're multiplying type with name?
No because then if you do Type* a, b you're declaring a as a Type pointer and b as a Type
typedef Type* LPTYPE
don't write nigger code then
How about you don't do that, then? Faggot.
>hiding pointers
fuck you, and your kind
Parent p;
Child c;
((Child*)&(p))->operator=(c);
C++ is nasty
>LP
found it
function(Type*, Type*);
function(Type* foo, Type* bar) {
...
}
Type *foo, Type *bar;
What does this even mean?
*Type name
Patrician tastes
The pointer is obviously part of the type. Otherwise you could say
Object *o;
Object o2;
o = o2;
You obviously can't because they are different types.
It means "declare an instance if a parent class and it's derived child class. Then use pointer fuckery to ignore class hierarchy and use the child's assignment operator to reset values of the parent class."
If you arent extremely careful with class hierarchy data handling, this will cause an really nasty and hard to find memory leak. However if you are super careful then this can be a useful bit of code. Also the compiler will not recognize this as a bug or even give a warning.
The * operator in declarations is a prefix operator. It means the name / expression to the right of it can be dereferenced. type* name is for people who don't understand declaration syntax, or the few people who do actually understand it but are in denial, such as Bjarne Stroustrup.
Type* name
void Func()
{
stuff
}
Type
name1,
name2;
I do these and it really seems to trigger people. Had to repost because the typos were flaring up my autism.
based and redpilled