Click here to Skip to main content
15,895,256 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: srandom and random Pin
Victor Nijegorodov9-Jan-20 22:51
Victor Nijegorodov9-Jan-20 22:51 
QuestionRedirect to my struct Pin
_Flaviu7-Jan-20 21:58
_Flaviu7-Jan-20 21:58 
AnswerRe: Redirect to my struct Pin
Afzaal Ahmad Zeeshan7-Jan-20 22:11
professionalAfzaal Ahmad Zeeshan7-Jan-20 22:11 
GeneralRe: Redirect to my struct Pin
_Flaviu7-Jan-20 22:38
_Flaviu7-Jan-20 22:38 
GeneralRe: Redirect to my struct Pin
_Flaviu8-Jan-20 0:29
_Flaviu8-Jan-20 0:29 
GeneralRe: Redirect to my struct Pin
Richard MacCutchan8-Jan-20 2:21
mveRichard MacCutchan8-Jan-20 2:21 
GeneralRe: Redirect to my struct Pin
_Flaviu8-Jan-20 3:15
_Flaviu8-Jan-20 3:15 
GeneralRe: Redirect to my struct Pin
k50548-Jan-20 3:38
mvek50548-Jan-20 3:38 
Namespaces are a C++ feature, and not available if you are using C only. Basically a namespace wraps a set of definitions so that they can be uniquely identified within a source listing. eg:
C++
namespace MyLib {
   class A {
       int x;
       ...
   };
}

namespace MyProj {
   class A {
       int y;
       ...
   };
}

...

int main() {
    MyProj::A a1;  // defines an object of type class A from namespace MyProj
    MyLib::A  a2;  // defines an object of type class A from namespace MyLib

    a1.y = a2.y;   // don't need namespace resolution tags within function
}
update:The last line of the sample code, above should be a1.y = a2.x, apologies for any confusion Frown | :(

If, however, you are using C, you've got two choices.
1) refactor you project so that your SID and the system SID never appear in the same source code file (otherwise known as a translation unit). That's not always possible, and even when it is, it's usually requires a lot of thought, care, and effort.
2) refactor you project and rename your SID to something else, eg MyProg_SID. That's still a lot of work, but its' probably a lot less work than option 1, above. Additionally, your IDE might provide a renaming tool that will do the grunt work for you. If not, you might be able to use the find and replace feature of your favorite text editor.

modified 8-Jan-20 10:07am.

GeneralRe: Redirect to my struct Pin
_Flaviu8-Jan-20 18:59
_Flaviu8-Jan-20 18:59 
GeneralRe: Redirect to my struct Pin
Richard MacCutchan8-Jan-20 3:44
mveRichard MacCutchan8-Jan-20 3:44 
GeneralRe: Redirect to my struct Pin
leon de boer8-Jan-20 6:00
leon de boer8-Jan-20 6:00 
GeneralRe: Redirect to my struct Pin
_Flaviu8-Jan-20 7:09
_Flaviu8-Jan-20 7:09 
AnswerRe: Redirect to my struct Pin
Richard MacCutchan7-Jan-20 22:14
mveRichard MacCutchan7-Jan-20 22:14 
AnswerRe: Redirect to my struct Pin
phil.o7-Jan-20 22:33
professionalphil.o7-Jan-20 22:33 
GeneralRe: Redirect to my struct Pin
_Flaviu7-Jan-20 22:43
_Flaviu7-Jan-20 22:43 
AnswerRe: Redirect to my struct Pin
k50548-Jan-20 4:00
mvek50548-Jan-20 4:00 
GeneralRe: Redirect to my struct Pin
_Flaviu8-Jan-20 7:18
_Flaviu8-Jan-20 7:18 
AnswerRe: Redirect to my struct Pin
Stefan_Lang8-Jan-20 21:44
Stefan_Lang8-Jan-20 21:44 
Questionerror C3861: 'major': identifier not found Pin
_Flaviu6-Jan-20 22:29
_Flaviu6-Jan-20 22:29 
AnswerRe: error C3861: 'major': identifier not found Pin
Victor Nijegorodov6-Jan-20 23:49
Victor Nijegorodov6-Jan-20 23:49 
GeneralRe: error C3861: 'major': identifier not found Pin
_Flaviu7-Jan-20 0:29
_Flaviu7-Jan-20 0:29 
GeneralRe: error C3861: 'major': identifier not found Pin
Victor Nijegorodov7-Jan-20 0:40
Victor Nijegorodov7-Jan-20 0:40 
GeneralRe: error C3861: 'major': identifier not found Pin
_Flaviu7-Jan-20 1:07
_Flaviu7-Jan-20 1:07 
GeneralRe: error C3861: 'major': identifier not found Pin
Victor Nijegorodov7-Jan-20 1:13
Victor Nijegorodov7-Jan-20 1:13 
AnswerRe: error C3861: 'major': identifier not found Pin
Stefan_Lang8-Jan-20 21:58
Stefan_Lang8-Jan-20 21:58 

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.