Click here to Skip to main content
15,894,630 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to assign class variable value using loadlibrary function Pin
CPallini13-Aug-10 2:58
mveCPallini13-Aug-10 2:58 
QuestionHow system finds DLLs Pin
kapax513-Aug-10 1:34
kapax513-Aug-10 1:34 
AnswerRe: How system finds DLLs Pin
Niklas L13-Aug-10 1:45
Niklas L13-Aug-10 1:45 
GeneralRe: How system finds DLLs Pin
kapax513-Aug-10 1:48
kapax513-Aug-10 1:48 
AnswerRe: How system finds DLLs Pin
Chris Meech13-Aug-10 1:51
Chris Meech13-Aug-10 1:51 
QuestionHelp Needed on C2159 Pin
Hari_1612-Aug-10 23:46
Hari_1612-Aug-10 23:46 
AnswerRe: Help Needed on C2159 Pin
Richard MacCutchan13-Aug-10 0:32
mveRichard MacCutchan13-Aug-10 0:32 
AnswerRe: Help Needed on C2159 Pin
Paul Michalik14-Aug-10 2:39
Paul Michalik14-Aug-10 2:39 
You cannot use typedef and static that way. "static" defines a storage type for an instance (of whatever) and is not related to the type itself.

By

typedef A* (*CreateInstance)();


you have defined a type alias for a type "function taking no parameters and returning pointer to A". The name of the alias is CreateInstance and it is compatible with anything which satisfies this type definition. You can use your new alias as follows:

class AProvider {
public:
 static A* Create() {
  return new A();
 }
};

A* StandAloneCreate() {
 return new A();
}

...

CreateInstance Creator1 = StandaloneCreate;

CreateInstance Creator2 = AProvider::Create;

A* tA1Instance = Creator1();

A* tA2Instance = Creator2();
...

QuestionArray of Strings Pin
T.RATHA KRISHNAN12-Aug-10 19:31
T.RATHA KRISHNAN12-Aug-10 19:31 
AnswerRe: Array of Strings PinPopular
Niklas L12-Aug-10 22:08
Niklas L12-Aug-10 22:08 
AnswerRe: Array of Strings Pin
Richard MacCutchan12-Aug-10 22:38
mveRichard MacCutchan12-Aug-10 22:38 
AnswerRe: Array of Strings Pin
Moak13-Aug-10 1:06
Moak13-Aug-10 1:06 
QuestionInfo On DLLEXPORT Pin
Hari_1612-Aug-10 18:47
Hari_1612-Aug-10 18:47 
AnswerRe: Info On DLLEXPORT Pin
«_Superman_»12-Aug-10 19:07
professional«_Superman_»12-Aug-10 19:07 
AnswerRe: Info On DLLEXPORT Pin
KarstenK12-Aug-10 21:42
mveKarstenK12-Aug-10 21:42 
QuestionRotate Rectangle Pin
raju_shiva12-Aug-10 18:22
raju_shiva12-Aug-10 18:22 
AnswerRe: Rotate Rectangle Pin
CPallini12-Aug-10 21:45
mveCPallini12-Aug-10 21:45 
QuestionHooking a driver to check application Pin
Fareed Rizkalla12-Aug-10 10:11
Fareed Rizkalla12-Aug-10 10:11 
QuestionInvalidate() Error CDialog Pin
mohit`1212-Aug-10 6:24
mohit`1212-Aug-10 6:24 
AnswerRe: Invalidate() Error CDialog Pin
Niklas L12-Aug-10 7:50
Niklas L12-Aug-10 7:50 
GeneralRe: Invalidate() Error CDialog Pin
mohit`1213-Aug-10 4:53
mohit`1213-Aug-10 4:53 
GeneralRe: Invalidate() Error CDialog Pin
mohit`1213-Aug-10 7:11
mohit`1213-Aug-10 7:11 
GeneralRe: Invalidate() Error CDialog Pin
Niklas L13-Aug-10 21:10
Niklas L13-Aug-10 21:10 
GeneralRe: Invalidate() Error CDialog Pin
mohit`1215-Aug-10 10:38
mohit`1215-Aug-10 10:38 
GeneralRe: Invalidate() Error CDialog Pin
Niklas L15-Aug-10 22:28
Niklas L15-Aug-10 22:28 

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.