Advertisement

03.16.2003 at 11:32AM PST, ID: 20552640
[x]
Attachment Details

does the underscore or double underscore mean something in c++?

Asked by takkie in C Programming Language

Tags: underscore, does, double, what

there are some variables that have some leading underscores (_) or (__) infront of a variable...does that mean anything?

I am not looking for answers like, leading underscores for a variable name is valid. I understnad that...but i have seen some codes, for example, look below.


class CMyClass  
{
public:
     __declspec(dllexport)  CString SayHello (CString strName);
     __declspec(dllexport)  CMyClass();
     __declspec(dllexport)  virtual ~CMyClass();

};

why do they design declspecto have 2 leading underscores? There are some with just 1 leading underscores...

from the books i read for c++, i dont see any explanation of this...
anyhelp?

by the way, i asked a question last week, but didnt close it yet, i have an answer to accept...but i cant find that question...how do i see what are the qeustions i have asked in experts-exchange.com??

thanks,
takkieStart Free Trial
 
 
[+][-]03.16.2003 at 12:12PM PST, ID: 8147340

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.16.2003 at 12:25PM PST, ID: 8147379

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.16.2003 at 01:25PM PST, ID: 8147588

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.16.2003 at 01:48PM PST, ID: 8147639

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.16.2003 at 02:28PM PST, ID: 8147761

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.16.2003 at 08:30PM PST, ID: 8149369

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.16.2003 at 08:50PM PST, ID: 8149434

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: C Programming Language
Tags: underscore, does, double, what
Sign Up Now!
Solution Provided By: efn
Participating Experts: 4
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32