Click here to Skip to main content
15,888,461 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Dos command Pin
MsmVc4-Feb-11 0:27
MsmVc4-Feb-11 0:27 
AnswerRe: Dos comman Pin
Cool_Dev3-Feb-11 23:03
Cool_Dev3-Feb-11 23:03 
AnswerRe: Dos command Pin
csrss3-Feb-11 23:25
csrss3-Feb-11 23:25 
GeneralRe: Dos command Pin
MsmVc4-Feb-11 1:11
MsmVc4-Feb-11 1:11 
QuestionWould you all call this namespace abuse? Pin
asincero3-Feb-11 14:06
asincero3-Feb-11 14:06 
AnswerRe: Would you all call this namespace abuse? Pin
Madhu Nair3-Feb-11 16:33
Madhu Nair3-Feb-11 16:33 
GeneralRe: Would you all call this namespace abuse? Pin
asincero3-Feb-11 16:45
asincero3-Feb-11 16:45 
GeneralRe: Would you all call this namespace abuse? Pin
Stefan_Lang3-Feb-11 21:55
Stefan_Lang3-Feb-11 21:55 
Yes and no.

Yes, they are globally accessible, but that was also true in the first approach, since they've been declared public.

No they are not global, because, technically, only things declared outside a struct, class or namespace are considered global. These symbols are local to the newly defined namespace. It's about as close to global that you can get though, since - similar to true global definitions - the declaration s of the elements of a namespaces may be spread out over the codebase, so you're not guaranteed to see everything that's in a namespace when you look at a namespace declaration.

This can be considered a disadvantage, but it is also an advantage, as you can later extend a namespace for internal use without having to change a header and thus the interface of whatever you're trying to encapsulate. You might also deliberatly spread different parts of the namespace over several headers in order to minimize dependencies and thus reduce compile times.
AnswerRe: Would you all call this namespace abuse? Pin
Alain Rist3-Feb-11 20:31
Alain Rist3-Feb-11 20:31 
QuestionRe: Would you all call this namespace abuse? Pin
bob169724-Feb-11 5:03
bob169724-Feb-11 5:03 
QuestionChange Image size Pin
john56322-Feb-11 20:32
john56322-Feb-11 20:32 
AnswerRe: Change Image size Pin
Madhu Nair2-Feb-11 21:17
Madhu Nair2-Feb-11 21:17 
AnswerRe: Change Image size Pin
S p k 5213-Feb-11 1:00
S p k 5213-Feb-11 1:00 
AnswerRe: Change Image size Pin
Cool_Dev3-Feb-11 2:01
Cool_Dev3-Feb-11 2:01 
QuestionError in Release() throw function Pin
Anu_Bala2-Feb-11 19:30
Anu_Bala2-Feb-11 19:30 
AnswerRe: Error in Release() throw function Pin
Andrew Brock2-Feb-11 19:43
Andrew Brock2-Feb-11 19:43 
GeneralRe: Error in Release() throw function Pin
Anu_Bala2-Feb-11 20:05
Anu_Bala2-Feb-11 20:05 
GeneralRe: Error in Release() throw function Pin
Andrew Brock2-Feb-11 20:35
Andrew Brock2-Feb-11 20:35 
GeneralRe: Error in Release() throw function Pin
Richard MacCutchan2-Feb-11 21:54
mveRichard MacCutchan2-Feb-11 21:54 
QuestionGetting the error Link2001: unresolved reference to the function Pin
charanmanjunath2-Feb-11 18:14
charanmanjunath2-Feb-11 18:14 
AnswerRe: Getting the error Link2001: unresolved reference to the function Pin
_AnsHUMAN_ 2-Feb-11 18:20
_AnsHUMAN_ 2-Feb-11 18:20 
GeneralRe: Getting the error Link2001: unresolved reference to the function Pin
charanmanjunath2-Feb-11 18:25
charanmanjunath2-Feb-11 18:25 
AnswerRe: Getting the error Link2001: unresolved reference to the function Pin
Andrew Brock2-Feb-11 18:25
Andrew Brock2-Feb-11 18:25 
AnswerRe: Getting the error Link2001: unresolved reference to the function Pin
ShilpiP2-Feb-11 18:37
ShilpiP2-Feb-11 18:37 
GeneralRe: Getting the error Link2001: unresolved reference to the function Pin
charanmanjunath2-Feb-11 19:19
charanmanjunath2-Feb-11 19:19 

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.