Click here to Skip to main content
14,456,907 members

C / C++ / MFC

 
AnswerRe: Redirect to my struct Pin
Afzaal Ahmad Zeeshan7-Jan-20 23:11
mvaAfzaal Ahmad Zeeshan7-Jan-20 23:11 
GeneralRe: Redirect to my struct Pin
_Flaviu7-Jan-20 23:38
Member_Flaviu7-Jan-20 23:38 
GeneralRe: Redirect to my struct Pin
_Flaviu8-Jan-20 1:29
Member_Flaviu8-Jan-20 1:29 
GeneralRe: Redirect to my struct Pin
Richard MacCutchan8-Jan-20 3:21
communityengineerRichard MacCutchan8-Jan-20 3:21 
GeneralRe: Redirect to my struct Pin
_Flaviu8-Jan-20 4:15
Member_Flaviu8-Jan-20 4:15 
GeneralRe: Redirect to my struct Pin
k50548-Jan-20 4:38
Memberk50548-Jan-20 4:38 
GeneralRe: Redirect to my struct Pin
_Flaviu8-Jan-20 19:59
Member_Flaviu8-Jan-20 19:59 
GeneralRe: Redirect to my struct Pin
Richard MacCutchan8-Jan-20 4:44
communityengineerRichard MacCutchan8-Jan-20 4:44 
It is not that straightforward unfortunately. A namespace is a qualifier that allows you to have objects with the same name in a single compilation unit. As a simple example:
// NOTE: namespaces must be declared at file scope, or in a header

namespace foo
{
    typedef struct
    {
        int bar;
    } FOOBAR;
};

namespace gaa
{
    typedef struct
    {
        char bar;
    } FOOBAR;
};

// the struct name FOOBAR may now be qualified to avoid ambiguity

int main
{
    foo::FOOBAR foobar;  // as declared in namespace foo
    foobar.bar = 10;     // the variable is int type
    
    gaa::FOOBAR gaabar;  // as declared in namespace gaa
    gaabar.bar = 'X';    // here is is char type
    
}

GeneralRe: Redirect to my struct Pin
leon de boer8-Jan-20 7:00
Memberleon de boer8-Jan-20 7:00 
GeneralRe: Redirect to my struct Pin
_Flaviu8-Jan-20 8:09
Member_Flaviu8-Jan-20 8:09 
AnswerRe: Redirect to my struct Pin
Richard MacCutchan7-Jan-20 23:14
communityengineerRichard MacCutchan7-Jan-20 23:14 
AnswerRe: Redirect to my struct Pin
phil.o7-Jan-20 23:33
mvephil.o7-Jan-20 23:33 
GeneralRe: Redirect to my struct Pin
_Flaviu7-Jan-20 23:43
Member_Flaviu7-Jan-20 23:43 
AnswerRe: Redirect to my struct Pin
k50548-Jan-20 5:00
Memberk50548-Jan-20 5:00 
GeneralRe: Redirect to my struct Pin
_Flaviu8-Jan-20 8:18
Member_Flaviu8-Jan-20 8:18 
AnswerRe: Redirect to my struct Pin
Stefan_Lang8-Jan-20 22:44
mveStefan_Lang8-Jan-20 22:44 
Questionerror C3861: 'major': identifier not found Pin
_Flaviu6-Jan-20 23:29
Member_Flaviu6-Jan-20 23:29 
AnswerRe: error C3861: 'major': identifier not found Pin
Victor Nijegorodov7-Jan-20 0:49
MemberVictor Nijegorodov7-Jan-20 0:49 
GeneralRe: error C3861: 'major': identifier not found Pin
_Flaviu7-Jan-20 1:29
Member_Flaviu7-Jan-20 1:29 
GeneralRe: error C3861: 'major': identifier not found Pin
Victor Nijegorodov7-Jan-20 1:40
MemberVictor Nijegorodov7-Jan-20 1:40 
GeneralRe: error C3861: 'major': identifier not found Pin
_Flaviu7-Jan-20 2:07
Member_Flaviu7-Jan-20 2:07 
GeneralRe: error C3861: 'major': identifier not found Pin
Victor Nijegorodov7-Jan-20 2:13
MemberVictor Nijegorodov7-Jan-20 2:13 
AnswerRe: error C3861: 'major': identifier not found Pin
Stefan_Lang8-Jan-20 22:58
mveStefan_Lang8-Jan-20 22:58 
GeneralRe: error C3861: 'major': identifier not found Pin
_Flaviu8-Jan-20 23:04
Member_Flaviu8-Jan-20 23:04 
GeneralRe: error C3861: 'major': identifier not found Pin
Stefan_Lang8-Jan-20 23:40
mveStefan_Lang8-Jan-20 23:40 

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.