Int* x;

int* x;
int *x;
Well?

Attached: 1542022437995.jpg (512x422, 29K)

int * x;

/thread

std::unique

std::shared_ptr x;

int *x, *y;

int *(x)

I always used
int* x;
Since it seemed more obvious that it was an integer pointer data type, but ever since learning that
int* x, y;
Doesn’t declare two integer pointers I can see why it isn’t correct. I still think it looks cleaner though

And it also helps distinguish between declaring a pointer and dereferencing one

int * x;

fpbp

int*x;

int* x;
int* y;

int *x;
But if you were making a new language with sane syntax, int* x; would be correct.
People who use int* x; in C have never declared a function pointer.

var x = 5;

*int would be even better.

Sure, whatever.

They give identical results so pick the one you like.

Integer x;

[block]
char pointer = '*';
int pointerX;
[/block]

/thread

okay listen up
> int* x
implies that x is pointer to an int,
> int *x
implies that x dereferenced is an int.
Which one is easier to understad?

You should understand int *x to mean "*x is an int". That's why "int *x, y" means "*x is an int and y is an int" (so, *y is NOT an int).

So always use int *x.

int (star) ecks:

int

*

x

;

const char *x;
char const *x;

Well?

#define int* POINTERTOINT
#define x LETTERX
#define ; qwertyuiopasdfghjklzxcvbnm
POINTERTOINT LETTERXqwertyuiopasdfghjklzxcvbnm

first points to a constant char
second is a constant pointer to a char.
Different.

I don't like this apu

LPINT x;

Attached: 1538184615111.jpg (680x598, 54K)

No, you fucked up. char* const x is a constant pointer to a char. "const char" and "char const" is identical.

int* * *x;
Prove me wrong

X : access Integer;

based
cringe

The second one is more consistent with declaration semantics.
But you should rarely ever use raw pointers unless your language is so shit that it's the only kind of addressing it provides.

Even in modern C++ you should use many raw pointers. You simply shouldn't use owning raw pointers.

int *x;
- K&R

>he never heard of const char * const

based
cringe

Not the same thing, dipshit.

Whichever you feel like. I don't give a fuck. Just don't randomly switch between styles in the same project.