Click here to Skip to main content
15,886,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
NewsHow to provide a Security to a proprietary software or presemtation. Pin
Member 1278313512-Oct-16 20:03
Member 1278313512-Oct-16 20:03 
GeneralRe: How to provide a Security to a proprietary software or presemtation. Pin
jeron113-Oct-16 4:15
jeron113-Oct-16 4:15 
GeneralRe: How to provide a Security to a proprietary software or presemtation. Pin
leon de boer13-Oct-16 8:17
leon de boer13-Oct-16 8:17 
Questionclass is missing "type" - why ? Pin
Vaclav_12-Oct-16 15:00
Vaclav_12-Oct-16 15:00 
AnswerRe: class is missing "type" - why ? PinPopular
leon de boer12-Oct-16 17:45
leon de boer12-Oct-16 17:45 
AnswerRe: class is missing "type" - why ? Pin
Graham Breach12-Oct-16 23:11
Graham Breach12-Oct-16 23:11 
QuestionObject Creation of an class? Pin
Mathan_CodeProject11-Oct-16 5:17
Mathan_CodeProject11-Oct-16 5:17 
AnsweralternatRe: Object Creation of an class? Pin
leon de boer11-Oct-16 5:50
leon de boer11-Oct-16 5:50 
It makes no difference whether you are dealing with an object or a standard item like an int, float or double.

This form you have created the item type ... these all do the same
int i;                               // You created an integer type called i
double d;                            // You created a double called d
DownloadManager objDownloadManager;  // You created a DownloadManager called objDownloadManager

This form you have created a POINTER TO THE ITEM ... it's most likely just 4 bytes (assuming 32bit compilation).
As we haven't set them to anything they are effectively undefined and could be pointing anywhere.
int* i;                               // You created a pointer to an integer type called i
double* d;                            // You created a pointer to a double type called d
DownloadManager* objDownloadManager;  // You created a pointer to a DownloadManager type called objDownloadManager

So they are vastly different and not something you should ever be confused about .. NOT EVER.

So if you like the second form is like the address to your house, the first form is your ACTUAL PHYSICAL house.
What you are doing is telling me that if I write text for the address of a house I can live in the text because
it's the same thing as a physical house and it's confusing to you.

You use the pointer form for the same reason you use a written address for you house. Its a bit tiresome and hard
to carry the whole house around just so people can send you mail. The alternative reason might be because your
house hasn't yet been built to carry around Smile | :)
In vino veritas


modified 11-Oct-16 11:56am.

GeneralRe: alternatRe: Object Creation of an class? Pin
Mathan_CodeProject11-Oct-16 23:02
Mathan_CodeProject11-Oct-16 23:02 
AnswerRe: Object Creation of an class? Pin
Krishnakumartg11-Oct-16 19:46
Krishnakumartg11-Oct-16 19:46 
GeneralRe: Object Creation of an class? Pin
Mathan_CodeProject11-Oct-16 23:01
Mathan_CodeProject11-Oct-16 23:01 
AnswerRe: Object Creation of an class? Pin
Midi_Mick11-Oct-16 22:13
professionalMidi_Mick11-Oct-16 22:13 
GeneralRe: Object Creation of an class? Pin
Mathan_CodeProject11-Oct-16 23:01
Mathan_CodeProject11-Oct-16 23:01 
QuestionC++ syntax Pin
Ratul Thakur10-Oct-16 21:35
Ratul Thakur10-Oct-16 21:35 
AnswerRe: C++ syntax Pin
CPallini10-Oct-16 21:49
mveCPallini10-Oct-16 21:49 
AnswerRe: C++ syntax Pin
Richard MacCutchan10-Oct-16 21:50
mveRichard MacCutchan10-Oct-16 21:50 
AnswerRe: C++ syntax Pin
David Crow11-Oct-16 6:20
David Crow11-Oct-16 6:20 
QuestionOne more error using function pointers - void value not ignored as it ought to be Pin
Vaclav_9-Oct-16 6:18
Vaclav_9-Oct-16 6:18 
AnswerRe: One more error using function pointers - void value not ignored as it ought to be Pin
Richard MacCutchan9-Oct-16 6:36
mveRichard MacCutchan9-Oct-16 6:36 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
Vaclav_9-Oct-16 7:53
Vaclav_9-Oct-16 7:53 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
leon de boer9-Oct-16 23:11
leon de boer9-Oct-16 23:11 
AnswerRe: One more error using function pointers - void value not ignored as it ought to be Pin
leon de boer9-Oct-16 21:42
leon de boer9-Oct-16 21:42 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
Richard MacCutchan9-Oct-16 21:49
mveRichard MacCutchan9-Oct-16 21:49 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
leon de boer9-Oct-16 23:23
leon de boer9-Oct-16 23:23 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
Richard MacCutchan9-Oct-16 23:25
mveRichard MacCutchan9-Oct-16 23:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.