Click here to Skip to main content
15,921,941 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Adding status bar in a dialog Pin
KASR19-Jun-08 1:42
KASR19-Jun-08 1:42 
GeneralRe: Adding status bar in a dialog Pin
Cedric Moonen9-Jun-08 1:47
Cedric Moonen9-Jun-08 1:47 
GeneralRe: Adding status bar in a dialog Pin
KASR119-Jun-08 1:41
KASR119-Jun-08 1:41 
AnswerRe: Adding status bar in a dialog Pin
sudhir_Kumar9-Jun-08 0:23
sudhir_Kumar9-Jun-08 0:23 
AnswerRe: Adding status bar in a dialog Pin
Hamid_RT9-Jun-08 2:04
Hamid_RT9-Jun-08 2:04 
AnswerRe: Adding status bar in a dialog Pin
bulg9-Jun-08 12:59
bulg9-Jun-08 12:59 
GeneralRe: Adding status bar in a dialog Pin
KASR19-Jun-08 17:58
KASR19-Jun-08 17:58 
Questionproblem with VC++ and sql version Pin
tasumisra8-Jun-08 23:53
tasumisra8-Jun-08 23:53 
QuestionRe: problem with VC++ and sql version Pin
Mark Salsbery9-Jun-08 6:24
Mark Salsbery9-Jun-08 6:24 
AnswerRe: problem with VC++ and sql version Pin
tasumisra9-Jun-08 18:05
tasumisra9-Jun-08 18:05 
GeneralRe: problem with VC++ and sql version Pin
Mark Salsbery10-Jun-08 5:26
Mark Salsbery10-Jun-08 5:26 
QuestionWM_PRINT Pin
subramanyeswari8-Jun-08 23:53
subramanyeswari8-Jun-08 23:53 
AnswerRe: WM_PRINT Pin
Naveen9-Jun-08 0:16
Naveen9-Jun-08 0:16 
GeneralRe: WM_PRINT [modified] Pin
subramanyeswari9-Jun-08 0:37
subramanyeswari9-Jun-08 0:37 
QuestionHow to disable "Show window content while dragging" style to my CDialog Window Pin
Nyil8-Jun-08 23:47
Nyil8-Jun-08 23:47 
AnswerRe: How to disable "Show window content while dragging" style to my CDialog Window Pin
sudhir_Kumar8-Jun-08 23:55
sudhir_Kumar8-Jun-08 23:55 
AnswerRe: How to disable "Show window content while dragging" style to my CDialog Window Pin
James R. Twine9-Jun-08 1:08
James R. Twine9-Jun-08 1:08 
GeneralRe: How to disable "Show window content while dragging" style to my CDialog Window Pin
Nyil14-Jul-08 1:32
Nyil14-Jul-08 1:32 
QuestionCommunication between TreeView and FormView Pin
Maxim Zarus8-Jun-08 23:31
Maxim Zarus8-Jun-08 23:31 
AnswerRe: Communication between TreeView and FormView Pin
Paresh Chitte8-Jun-08 23:37
Paresh Chitte8-Jun-08 23:37 
AnswerRe: Communication between TreeView and FormView Pin
sudhir_Kumar8-Jun-08 23:48
sudhir_Kumar8-Jun-08 23:48 
GeneralRe: Communication between TreeView and FormView Pin
Maxim Zarus9-Jun-08 0:02
Maxim Zarus9-Jun-08 0:02 
GeneralRe: Communication between TreeView and FormView Pin
sudhir_Kumar9-Jun-08 0:18
sudhir_Kumar9-Jun-08 0:18 
GeneralRe: Communication between TreeView and FormView Pin
Maxim Zarus9-Jun-08 0:42
Maxim Zarus9-Jun-08 0:42 
QuestionProblem with variables Pin
pl_kode8-Jun-08 23:18
pl_kode8-Jun-08 23:18 
I had posted this earlier but no reply. Sorry for posting it again

This is how it is...

My Class is defined in newclass.h as...
Class A
{
public:
    	void out_func1();  
	void out_func2();  
  class B 	
  {   
  public:  
 	  string path;  
  	  in_func1();  
 };
};

I then Get the path at intialize.cpp as follows....
void A::out_func1()
{
 B obj;	
 obj.path="c:\folder\file1.txt";
}

Then I try to open the file to write in write.cpp...
void A::out_func2()
{	
 B obj;	
 ofstream myfile;
 myfile.open (obj.path.c_str(), ios::app);
...
}


This crashes.I have included the header initialise.h too.
Please let me know were I could have gone wrong. I think I am having problem with the scope of the varible. But I am not sure.

THANKS.

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.