Click here to Skip to main content
16,008,075 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWhy Pointers? Pin
a.a8-May-02 0:58
a.a8-May-02 0:58 
AnswerRe: Why Pointers? Pin
8-May-02 1:25
suss8-May-02 1:25 
GeneralRe: Why Pointers? Pin
redeemer8-May-02 12:42
redeemer8-May-02 12:42 
GeneralRe: Why Pointers? Pin
8-May-02 22:36
suss8-May-02 22:36 
AnswerRe: Why Pointers? Pin
Philip Patrick8-May-02 1:34
professionalPhilip Patrick8-May-02 1:34 
AnswerRe: Why Pointers? Pin
Andrew Peace8-May-02 1:56
Andrew Peace8-May-02 1:56 
AnswerRe: Why Pointers? Pin
LittleYellowBird8-May-02 2:17
LittleYellowBird8-May-02 2:17 
AnswerRe: Why Pointers? Pin
Joaquín M López Muñoz8-May-02 3:07
Joaquín M López Muñoz8-May-02 3:07 
Since you say you're new at VC++, what follows may make little sense to you, but hopefully you'll grasp the idea soon.
If you're into OOP, many objects will be derived from a common base. Usually, a piece of code uses such object without really knowing the particular class they belong to (only that they're derived from the base). In this situation, passing by value (without pointers) is impossible, since the code won't know in advance how much space will take the object (different derivations can have more or less members not belonging to the base), so no copying around can be performed. I this case, the only solution is to pass to the unknowing code a pointer to the actual location of the object, so preventing copying.
In Java and C# the situation is the same, but the language hides this to you by making implicitly every object variable a pointer to an object --so these languages have pointers but you can't see them.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: Why Pointers? Pin
a.a8-May-02 3:27
a.a8-May-02 3:27 
AnswerRe: Why Pointers? Pin
Nish Nishant8-May-02 3:57
sitebuilderNish Nishant8-May-02 3:57 
AnswerRe: Why Pointers? [Just memory! ] Pin
Maxwell Chen8-May-02 8:45
Maxwell Chen8-May-02 8:45 
QuestionEasiest way to display colored text in a textbox? Pin
generic_user_id8-May-02 0:45
generic_user_id8-May-02 0:45 
AnswerRe: Easiest way to display colored text in a textbox? Pin
Nish Nishant8-May-02 4:05
sitebuilderNish Nishant8-May-02 4:05 
AnswerRe: Easiest way to display colored text in a textbox? Pin
Chris Losinger8-May-02 4:19
professionalChris Losinger8-May-02 4:19 
AnswerRe: Easiest way to display colored text in a textbox? Pin
Marc Richarme8-May-02 8:33
Marc Richarme8-May-02 8:33 
GeneralRe: Easiest way to display colored text in a textbox? Pin
generic_user_id8-May-02 23:19
generic_user_id8-May-02 23:19 
GeneralKill exe's... ( processes) Pin
Braulio Dez8-May-02 0:12
Braulio Dez8-May-02 0:12 
GeneralRe: Kill exe's... ( processes) Pin
adara8-May-02 1:43
adara8-May-02 1:43 
GeneralRe: Kill exe's... ( processes) Pin
Braulio Dez8-May-02 2:47
Braulio Dez8-May-02 2:47 
GeneralRe: Kill exe's... ( processes) Pin
adara8-May-02 4:24
adara8-May-02 4:24 
GeneralRe: Kill exe's... ( processes) Pin
Nish Nishant8-May-02 4:08
sitebuilderNish Nishant8-May-02 4:08 
GeneralRe: Kill exe's... ( processes) Pin
Braulio Dez8-May-02 4:19
Braulio Dez8-May-02 4:19 
GeneralRe: Kill exe's... ( processes) Pin
Chris Losinger8-May-02 4:20
professionalChris Losinger8-May-02 4:20 
GeneralRe: Kill exe's... ( processes) Pin
Braulio Dez8-May-02 4:25
Braulio Dez8-May-02 4:25 
GeneralRe: Kill exe's... ( processes) Pin
Mike Nordell9-May-02 21:20
Mike Nordell9-May-02 21:20 

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.