Which is correct?

Which is correct?
int *x;
int* x;
int * x;

Attached: lp.jpg (800x600, 81K)

int *x

let x: number;

The type is integer pointer so you would group the type together. int* x.

The type is "int pointer" so it should be int*

Anything else makes no sense.

Not using C or C++ is the correct choice.

wrong example.
try this

int *x,y,z;
int* x,y,z;
int * x,y,z;

wrong example.
try this
int *x,y,z;
int* x,y,z;
int * x,y,z;

which can become even more confusing
int* *x,*y,&z;

type*
or
type&
is the dumbest way i've seen that people declare vars.

>not using go
var x *int

correct is to use Pascal and not that sea monstrosity

If it's confusing, don't declare multiple variables on one line.

Idiots.

Don't declare multiple variables which have different types on the same line.

there isn't such thing as "int*"
the primitive type is int.
pointers are a property of the variable.
Only idiots use int* var1,var2,var3;
we might as-well right C as in pic related, because some pytards like it.

Attached: Untitled.png (409x224, 5K)

LPWORD x;

typedef int* intPtr;
intPtr ap, bp;

get on my level plebs

No retard, it is absolutely a property of the type even if the retarded syntax doesn't reflect it.

x: Box

std::unique_ptr x;

You can’t even get it right lmao
windows retards everyone

Pick one, just be consistent.

let x = number

n

>int* x, y;
what's the type of y?

int. Don't declare multiple variables on same statement, problem solved.

Another vote for int *x; here

IIRC they all function the same, but I prefer the second, since I like to keep the pointer denotation with the type.

This. I don't understand why so many language violate this very simple idea.

best post

int *x;

Run this code.
#include

int main(int argc, const char **argv) {
char *a, b, *c;
printf("%d %d %d\n", sizeof(a), sizeof(b), sizeof(c));
return 0;
}

You'll get 8 1 8 on a 64 bit machine, and 4 1 4 on a 32 bit machine. The pointer status is tied to the variable identifier, not the type. Otherwise, a, b, c would all be pointers to char, not a pointer, a char, and a pointer. By thinking that the pointer status is tied to the type, you would erroneously come to the conclusion that int* x, y, z; defines three pointers to integers. When, in reality, it defines one pointer, and two integers.

Please never work with me. I would be terrified.

>The pointer status is tied to the variable identifier, not the type.
Lol it's not. It's just that the declaration syntax was designed that way and it's dumb.

The one that your project chooses and enforces with a styling program.

Attached: 1482581975185.gif (500x540, 2.9M)

I have a picture like that, of myself, it's very funny!!!

>It's just that the declaration syntax was designed that way and it's dumb
>lol it's not
Pick one. Dumb or not. that's the way C is designed. That is, by definition, how it work.

Internally, pointerness is very much a property of the type.

That doesn't matter. The thread is about the how the language is externalized to the user. Internally, everything could be cast to AVX datatypes, if the external functionality behaves one way, but the implementation does something incogruent with that external behavior, the external behavior is what dictates the way the system is used.

If I bleach a black man's skin, teach him English, why to not steal, get him a job, and otherwise turn him into a perfect facsimile of a white man, he may still be a nog at heart, but he functions as a white man and for all intents and purposes is.

Attached: maho smug.jpg (210x240, 9K)

ADR r0, x

Uh what, it's a variable of type pointer. You dereference it to a variable of type int. Your confusion comes from your (mostly useful) simplification of both as a single variable.

int *x; because you can declare multiple pointers in the same line and to emphasize that x is a pointer to integer.

How do you declare a function that returns a pointer to an int?

The correct choice is not to use a language retarded enough to allow that.

int* is not a type, see * is the dereference/indirection operator, meaning:
int *x;
*x is an integer (or x dereferenced is an integer) and thus x is a pointer to an integer.

What is x itself?

>t. webdev baby

/thread

It's not a dereference operator in that context.