November 6th, 2003, 10:05 PM
As stated before, I'm new to MFC programming. I come from the old DOS days. MS Quick C.
So here is my problem. During programming, I usually will put a few print statements in the code to monitor varibles or to mark that a function has been reached. Used to be I just used printf or the old _outtext(array,"CCC"var);
Well -outtext isn't in the lib and printf will not put anything to screen. Unless it's writing in the same color as my background.
So in short, I need to know how to quickly print a literal string/char or varible to screen.
Thanks. And yes I did look on the Code Guru pages/f.a.q. but couldn't find anything that would help.
Again, Thanks in advance for any and all responses
November 6th, 2003, 11:46 PM
Maybe you can using std::cout, which prints the variables' value to screen. For most funtamental types, std defined the operator <<, which performs output operation. For a customized type, you should also define the operator <<.
November 7th, 2003, 02:00 AM
I tried the cout<< but it wouln't print to screen. I had also tried printf. Same result. I believe the issue is I am writing an MFC window and not a console app. I could be wrong though.
I ended up using TextOut as such...
if(C_MainFrame::C_Status == 'J')
C_MainFrame::C_Status = 'G' ;
if(C_MainFrame::P_Status == 'J')
C_MainFrame::P_Status = 'H' ;
Probably not the best way but it worked and now I can delete it and continue on with the program
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!