Click here to Skip to main content
15,886,518 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow can I treat VT_DATE ? Pin
_Flaviu13-Apr-11 23:44
_Flaviu13-Apr-11 23:44 
AnswerRe: How can I treat VT_DATE ? Pin
CPallini13-Apr-11 23:58
mveCPallini13-Apr-11 23:58 
GeneralRe: How can I treat VT_DATE ? Pin
_Flaviu14-Apr-11 0:05
_Flaviu14-Apr-11 0:05 
GeneralRe: How can I treat VT_DATE ? Pin
CPallini14-Apr-11 0:15
mveCPallini14-Apr-11 0:15 
GeneralRe: How can I treat VT_DATE ? Pin
_Flaviu14-Apr-11 0:26
_Flaviu14-Apr-11 0:26 
AnswerRe: How can I treat VT_DATE ? Pin
T210215-Apr-11 10:47
T210215-Apr-11 10:47 
QuestionHow to use One Pointer Object in another .cpp file? Pin
002comp13-Apr-11 23:44
002comp13-Apr-11 23:44 
AnswerRe: How to use One Pointer Object in another .cpp file? Pin
«_Superman_»14-Apr-11 0:44
professional«_Superman_»14-Apr-11 0:44 
You can do this by declaring TEST* _pObj as a global pointer in A.cpp.
In SAMPLE.cpp make the declaration extern TEST* _pObj globally.
This way you will be able to access the same object from both the files.

However, I think this is where you need a singleton class.
This way you will be able to access the one and only object of the class from any CPP file in which you include the A.h file.

Here are a couple of articles on singleton -
C++ Design Pattern: What is a Singleton class?[^]
Singleton Pattern & its implementation with C++[^]
«_Superman 
I love work. It gives me something to do between weekends.


Microsoft MVP (Visual C++)

Polymorphism in C

GeneralRe: How to use One Pointer Object in another .cpp file? [modified] Pin
002comp14-Apr-11 1:35
002comp14-Apr-11 1:35 
AnswerRe: How to use One Pointer Object in another .cpp file? Pin
Albert Holguin15-Apr-11 4:35
professionalAlbert Holguin15-Apr-11 4:35 
AnswerRe: How to use One Pointer Object in another .cpp file? Pin
Stefan_Lang14-Apr-11 7:02
Stefan_Lang14-Apr-11 7:02 
AnswerRe: How to use One Pointer Object in another .cpp file? Pin
Albert Holguin14-Apr-11 14:43
professionalAlbert Holguin14-Apr-11 14:43 
GeneralRe: How to use One Pointer Object in another .cpp file? [modified] Pin
002comp14-Apr-11 21:14
002comp14-Apr-11 21:14 
GeneralRe: How to use One Pointer Object in another .cpp file? Pin
Stefan_Lang14-Apr-11 23:18
Stefan_Lang14-Apr-11 23:18 
GeneralRe: How to use One Pointer Object in another .cpp file? Pin
002comp15-Apr-11 2:24
002comp15-Apr-11 2:24 
GeneralRe: How to use One Pointer Object in another .cpp file? Pin
Stefan_Lang15-Apr-11 4:42
Stefan_Lang15-Apr-11 4:42 
GeneralRe: How to use One Pointer Object in another .cpp file? Pin
Albert Holguin15-Apr-11 4:29
professionalAlbert Holguin15-Apr-11 4:29 
AnswerRe: How to use One Pointer Object in another .cpp file? Pin
Code-o-mat14-Apr-11 23:07
Code-o-mat14-Apr-11 23:07 
QuestionHow to convert filename to fully qualified name when running an app with a filename argument in the current working directory Pin
Erik13-Apr-11 20:05
Erik13-Apr-11 20:05 
AnswerRe: How to convert filename to fully qualified name when running an app with a filename argument in the current working directory Pin
«_Superman_»13-Apr-11 21:30
professional«_Superman_»13-Apr-11 21:30 
GeneralRe: How to convert filename to fully qualified name when running an app with a filename argument in the current working directory Pin
Erik14-Apr-11 0:00
Erik14-Apr-11 0:00 
GeneralCMFCEditBrowseCtrl leaks... Pin
danLenehan13-Apr-11 8:51
danLenehan13-Apr-11 8:51 
GeneralRe: CMFCEditBrowseCtrl leaks... Pin
Maximilien13-Apr-11 9:42
Maximilien13-Apr-11 9:42 
GeneralRe: CMFCEditBrowseCtrl leaks... Pin
danLenehan13-Apr-11 13:48
danLenehan13-Apr-11 13:48 
GeneralRe: CMFCEditBrowseCtrl leaks... Pin
Maximilien13-Apr-11 14:15
Maximilien13-Apr-11 14:15 

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.