Click here to Skip to main content
15,902,447 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: A very strange problem (to me at least) ..... Pin
CPallini8-Feb-08 2:50
mveCPallini8-Feb-08 2:50 
GeneralRe: A very strange problem (to me at least) ..... Pin
Still learning how to code8-Feb-08 3:23
Still learning how to code8-Feb-08 3:23 
QuestionRe: A very strange problem (to me at least) ..... Pin
David Crow8-Feb-08 2:49
David Crow8-Feb-08 2:49 
GeneralRe: A very strange problem (to me at least) ..... Pin
Still learning how to code8-Feb-08 5:19
Still learning how to code8-Feb-08 5:19 
Generalnon-const static member variale initialization Pin
George_George7-Feb-08 21:16
George_George7-Feb-08 21:16 
GeneralRe: non-const static member variale initialization Pin
Matthew Faithfull7-Feb-08 22:13
Matthew Faithfull7-Feb-08 22:13 
GeneralRe: non-const static member variale initialization Pin
George_George8-Feb-08 1:49
George_George8-Feb-08 1:49 
GeneralRe: non-const static member variale initialization Pin
Matthew Faithfull8-Feb-08 2:29
Matthew Faithfull8-Feb-08 2:29 
George_George wrote:
Why it is namespace polluting? It is defined in the global/default namespace?


Exactly because it's defined in the global/default namespace and it is NOT really global or shouldn't be. What if I include a third party header file which also has
#define DEFAULT_ARRAYSIZE 400 - potential disaster.
One of the principles of good OO programming is 'locality of reference' which basically means a name should only be defined for the scope where it is meant to be used. That was the whole point of introducing namespace into C++ (which also didn't work in VC6) so that myLib::CString could exist in the same project as CString from MFC and the correct reference can always be resolved rather than refering to whichever one was included first or most recently.

Nothing is exactly what it seems but everything with seems can be unpicked.

GeneralRe: non-const static member variale initialization Pin
led mike8-Feb-08 4:17
led mike8-Feb-08 4:17 
GeneralRe: non-const static member variale initialization Pin
Matthew Faithfull8-Feb-08 6:05
Matthew Faithfull8-Feb-08 6:05 
GeneralRe: non-const static member variale initialization Pin
led mike8-Feb-08 7:22
led mike8-Feb-08 7:22 
GeneralRe: non-const static member variale initialization Pin
George_George8-Feb-08 21:28
George_George8-Feb-08 21:28 
GeneralRe: non-const static member variale initialization Pin
BadKarma7-Feb-08 22:37
BadKarma7-Feb-08 22:37 
GeneralRe: non-const static member variale initialization Pin
George_George8-Feb-08 1:58
George_George8-Feb-08 1:58 
GeneralRe: non-const static member variale initialization Pin
BadKarma8-Feb-08 2:30
BadKarma8-Feb-08 2:30 
GeneralRe: non-const static member variale initialization Pin
George_George8-Feb-08 21:33
George_George8-Feb-08 21:33 
GeneralCOM class registration failed. Pin
Royaltvk7-Feb-08 20:09
Royaltvk7-Feb-08 20:09 
GeneralRe: COM class registration failed. Pin
CPallini7-Feb-08 23:13
mveCPallini7-Feb-08 23:13 
GeneralRe: COM class registration failed. Pin
Royaltvk8-Feb-08 0:28
Royaltvk8-Feb-08 0:28 
GeneralRe: COM class registration failed. Pin
Rajkumar R8-Feb-08 0:50
Rajkumar R8-Feb-08 0:50 
GeneralRe: COM class registration failed. Pin
Iain Clarke, Warrior Programmer8-Feb-08 1:28
Iain Clarke, Warrior Programmer8-Feb-08 1:28 
GeneralRe: COM class registration failed. Pin
Rajkumar R8-Feb-08 2:01
Rajkumar R8-Feb-08 2:01 
Generaleditbox display problem Pin
Chandrasekharan P7-Feb-08 19:24
Chandrasekharan P7-Feb-08 19:24 
QuestionRe: editbox display problem Pin
Rajesh R Subramanian7-Feb-08 20:14
professionalRajesh R Subramanian7-Feb-08 20:14 
GeneralRe: editbox display problem Pin
Chandrasekharan P7-Feb-08 20:59
Chandrasekharan P7-Feb-08 20:59 

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.