Click here to Skip to main content
16,006,355 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: CString Convert to LPCTSTR Pin
toxcct13-Sep-06 4:21
toxcct13-Sep-06 4:21 
AnswerRe: CString Convert to LPCTSTR Pin
David Crow13-Sep-06 4:30
David Crow13-Sep-06 4:30 
AnswerRe: CString Convert to LPCTSTR Pin
Steve S13-Sep-06 6:34
Steve S13-Sep-06 6:34 
AnswerRe: CString Convert to LPCTSTR Pin
ThatsAlok13-Sep-06 18:51
ThatsAlok13-Sep-06 18:51 
AnswerRe: CString Convert to LPCTSTR Pin
Hamid_RT14-Sep-06 8:39
Hamid_RT14-Sep-06 8:39 
Question[Message Deleted] Pin
KKumarTG13-Sep-06 3:44
KKumarTG13-Sep-06 3:44 
AnswerRe: Exception in C++ Pin
Cedric Moonen13-Sep-06 3:46
Cedric Moonen13-Sep-06 3:46 
AnswerRe: Exception in C++ Pin
Zac Howland13-Sep-06 4:13
Zac Howland13-Sep-06 4:13 
If you are the one throwing it, and you are using Microsoft's compiler, you can use the __FILE__ and __LINE__ directives as a part of your exception message.

class custom_exception : public exception
{
public:
	custom_exception(const string& file, const string& line, const string& msg)
	{
		_Msg = file;
		_Msg += ":";
		_Msg += line;
		_Msg += "::";
		_Msg += msg;
	}

	string getMessage() const
	{
		return _Msg;
	}
private:
	string _Msg;
};

void MyFunction() throw(...)
{
	// something went wrong, need to throw
	throw custom_exception(__FILE__, __LINE__, "Something went wrong here!");
}


If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week

Zac

AnswerRe: [Message Deleted] Pin
ThatsAlok13-Sep-06 18:52
ThatsAlok13-Sep-06 18:52 
AnswerRe: [Message Deleted] Pin
Hamid_RT14-Sep-06 8:39
Hamid_RT14-Sep-06 8:39 
Questionmatlab file (m-file) to c++ Pin
Haoman1713-Sep-06 3:42
Haoman1713-Sep-06 3:42 
AnswerRe: matlab file (m-file) to c++ Pin
Jun Du13-Sep-06 8:15
Jun Du13-Sep-06 8:15 
QuestionShare OpenGL Displaylists in MDI Applications Pin
olaebo13-Sep-06 2:59
olaebo13-Sep-06 2:59 
AnswerRe: Share OpenGL Displaylists in MDI Applications Pin
nadiric13-Sep-06 5:46
nadiric13-Sep-06 5:46 
AnswerRe: Share OpenGL Displaylists in MDI Applications Pin
cmk13-Sep-06 8:07
cmk13-Sep-06 8:07 
QuestionVc++ express edition Pin
Anu_Bala13-Sep-06 2:49
Anu_Bala13-Sep-06 2:49 
AnswerRe: Vc++ express edition Pin
David Crow13-Sep-06 2:59
David Crow13-Sep-06 2:59 
GeneralRe: Vc++ express edition Pin
Anu_Bala13-Sep-06 18:04
Anu_Bala13-Sep-06 18:04 
Questionwindows explorer Pin
radhika2813-Sep-06 2:18
radhika2813-Sep-06 2:18 
AnswerRe: windows explorer Pin
sujtha13-Sep-06 2:22
sujtha13-Sep-06 2:22 
GeneralRe: windows explorer Pin
radhika2813-Sep-06 2:46
radhika2813-Sep-06 2:46 
GeneralRe: windows explorer Pin
Hamid_RT14-Sep-06 8:38
Hamid_RT14-Sep-06 8:38 
GeneralRe: windows explorer Pin
radhika2814-Sep-06 19:03
radhika2814-Sep-06 19:03 
GeneralRe: windows explorer Pin
Hamid_RT15-Sep-06 1:22
Hamid_RT15-Sep-06 1:22 
QuestionDislaying Text in Edit Control at runtime. Pin
Pratheep Kenny13-Sep-06 2:03
Pratheep Kenny13-Sep-06 2:03 

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.