Which is correct?
int* px, py, pz
int * px, py, pz
int *px, py, pz
Which is correct?
[CODE]
int *px;
int py, pz;
[/CODE]
/thread
Yes
>/threading your own post
all of them compile to the exact same code
you must specify a pointer for all variables separately
the third one of course
the first one might make you think all of them will be pointers, while the third one makes it clear its only a property of px
the second one is rarted
None are because py and pz will be integers instead of pointers to int and you're also missing semicolons
degenerate
int *px;
int *py;
int *pz;
I prefer option three, but I might be a brainlet so what do I know, anyway?
but then py and pz are pointers
p obviously stands for pointer and OP wants all of them to be pointers.
does he tho?
>px is a pointer
>py and pz aren't
What does the p stand for then?
Either way OP is stupid.
>Naming variables coherent names
What kind of degenerate were you birthed from?
int*
It's an intpointer. writing "int *" or "int *name" is basically like writing "cha r" or "cha rname"
maybe it was a trick, to see who would adhere strictly to given assignment
never underestimate OPs, they are generally sensitive intelligent people that respond positively to quality replies
TIL writing int *fa, *gg, *ot is the same as writing cha rfa, rgg, rot
that''s how it should have worked, but that's not how it does
I'm convinced that people who write int* ptr are weenies who've never used a function pointer
>using a language with pointers
maybe you could tell us how you would design a system programming language fittinng the niche of portable one-level-above-assembly without pointers?
>using a language without arrays
>using arrays
the bottom, py and pz aren't pointers and the top one treats pointers like a type
it's like you're unemployed or something
int* px;
int py;
int pz;
The only correct answer.
that's something an op would say