Click here to Skip to main content
11,708,892 members (73,737 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C++
I wonder, What is difference to
int* a;
int a;

Why use the '*' marker?
Thanks for helps and answer...
Posted 27-Apr-13 12:14pm
ThePhantomUpvoter at 27-Apr-13 18:18pm
One is an integer variable and the other is a pointer to an integer variable.
tazugur at 28-Apr-13 7:52am
What did you mean? Which, where used?
Philippe Mori at 29-Apr-13 18:52pm
You should first read a book or a tutorial on C. Without a minimum Learning first, you won't go very far.
Style-7 at 1-May-13 8:25am
Go read book.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Andreas Gieriet at 27-Apr-13 20:13pm
My 5!
Any tutorial on C would do since this is so basic to C.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

The first is like a street sign pointing in one direction, and telling you Moscow is 7843 miles that way.

The second is Moscow. Wink | ;-)

P.S.: If you need any more help regarding C/C++ variable declarations, try this link:[^]
CPallini at 29-Apr-13 3:46am
Even Napoleon missed that.
Stefan_Lang at 29-Apr-13 4:26am
He tried to delete Moscow before Allocating it, so he failed due to a Null-pointer exception when trying to dereference it :D
Pravinda Ama. at 1-May-13 9:35am
You are russian :D
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Pointers are one of the basic features of the C programming language. They should become part of your DNA, like being able to Google for[^].
H.Brydon at 1-May-13 2:41am
+5 on all counts!
Sergey Alexandrovich Kryukov at 23-Aug-13 23:05pm
Great, a 5.
CPallini at 24-Aug-13 2:49am
Thank you, Sergey.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 319
1 Maciej Los 235
2 Mika Wendelius 170
3 OriginalGriff 163
4 Peter Leow 139
0 OriginalGriff 9,253
1 Sergey Alexandrovich Kryukov 8,562
2 CPallini 5,189
3 Maciej Los 4,966
4 Mika Wendelius 3,856

Advertise | Privacy | Mobile
Web02 | 2.8.150819.1 | Last Updated 1 May 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100