int* a;
int *b;
Well Jow Forums?
int* a;
int *b;
Well Jow Forums?
Type data belongs together, so for me it's int* but I have noticed that most examples on the internet use int *
int * c
int * a;
>pointers
LMAO
int* a because *a is dereferencing syntax.
OP you got the correct answer in the first reply
for me it's int* a;
on the other hand, *a would be an int then
Good point
int *a, because you can write int *a, *b, but you can't write it with int* a
int* a, *b;
Wow, I can't believe this. That's stupid as fuck.
int a, b;
Creates two ints. So why doesn't
int* a, b;
Create two pointers ints? It says a is int* but b is int. That makes no sense at all.
This might be the dumbest thing I've seen in this language. Been quite impressed with C overall.
this. unironically
you're using both options but you're only allowed to use one
>but you're only allowed to use one
well, according to this thread
I started doing int* when I started learning C++
anything other than int *b; is nigger tier
i dont understand whats happening in this thread.
I was going to say who cares until i saw this.
That is fucking stupid, they should change this or at least have the compiler warn about it.
This is the reason I just use one init. per line, e.g.
int* a;
int* b;
Consistency is king (and it makes for better diffs, too)
I think that
int* a
Looks semantically better, when you consider how declaring things works in C.
However, I learnt it as
int *b
and I just can't bring myself to use the int* style because I'm so used to what I've learnt.
>int times a
>muliple declarations on a single line
please stay away from programming forever