Click here to Skip to main content
15,900,724 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Prompt on window closing Pin
djordj17-Mar-03 5:20
djordj17-Mar-03 5:20 
GeneralRe: Prompt on window closing Pin
RobJones17-Mar-03 5:32
RobJones17-Mar-03 5:32 
GeneralRe: Prompt on window closing Pin
Brian Shifrin17-Mar-03 7:03
Brian Shifrin17-Mar-03 7:03 
GeneralRe: Prompt on window closing Pin
Michael Dunn17-Mar-03 7:19
sitebuilderMichael Dunn17-Mar-03 7:19 
GeneralNeed help of CListCtrl with Up/Down keyboard Pin
ATC17-Mar-03 2:48
ATC17-Mar-03 2:48 
GeneralRe: Need help of CListCtrl with Up/Down keyboard Pin
Alvaro Mendez17-Mar-03 7:45
Alvaro Mendez17-Mar-03 7:45 
GeneralRe: Need help of CListCtrl with Up/Down keyboard Pin
ATC17-Mar-03 16:55
ATC17-Mar-03 16:55 
GeneralPlease try this ,simple and it has bug. Pin
anju17-Mar-03 2:47
anju17-Mar-03 2:47 
Hi,All

The following code giving me an error while running in Release Mode.
I tested this code under
Windows2000 professional,VC++6.0.

CMyDlg::OnButton()
{
BYTE byByteCmd;
CString strTemp;
char szVal[10];
szVal[0]='\0';
sprintf(szVal,"%d",1);
sscanf(szVal,"%X",&byByteCmd);
}
can any one tell me what is wrong with this code.


My observations:
1.If i commented CString strTemp---It is not giving any error
2.If this code running under Debug Mode--it is not giving any error
3.If this code running under Release Mode with TRy CATCH--it is not giving any error
TRY
{
BYTE byByteCmd;
CString strTemp;
char szVal[10];
szVal[0]='\0';
sprintf(szVal,"%d",1);
sscanf(szVal,"%X",&byByteCmd);
}
CATCH(CExPetion,expGen)
{
char szError[100];
exGen->GetErrorMessage(szError,100);
exGen->Delete();
}
END_CATCH

I am happiest man,If some one explain me step by step with this observations, why it is giving error in some conditions and not in another conditoions.

Thank in AdvanceRose | [Rose]

anju
GeneralRe: Please try this ,simple and it has bug. Pin
AlexO17-Mar-03 2:57
AlexO17-Mar-03 2:57 
GeneralRe: Please try this ,simple and it has bug. Pin
anju17-Mar-03 3:55
anju17-Mar-03 3:55 
GeneralRe: Please try this ,simple and it has bug. Pin
Ted Ferenc17-Mar-03 5:17
Ted Ferenc17-Mar-03 5:17 
GeneralRe: Please try this ,simple and it has bug. Pin
Brian Shifrin17-Mar-03 7:12
Brian Shifrin17-Mar-03 7:12 
GeneralRe: Please try this ,simple and it has bug. Pin
anju17-Mar-03 16:14
anju17-Mar-03 16:14 
QuestionDeadlock when linking 2 DLLs that call eachother ? Pin
eladho17-Mar-03 2:21
eladho17-Mar-03 2:21 
AnswerRe: Deadlock when linking 2 DLLs that call eachother ? Pin
AlexO17-Mar-03 2:53
AlexO17-Mar-03 2:53 
GeneralRe: Deadlock when linking 2 DLLs that call eachother ? Pin
eladho17-Mar-03 3:00
eladho17-Mar-03 3:00 
AnswerRe: Deadlock when linking 2 DLLs that call eachother ? Pin
Brian Shifrin17-Mar-03 7:22
Brian Shifrin17-Mar-03 7:22 
GeneralNetUserGetInfo Pin
Sonu Kapoor17-Mar-03 1:54
Sonu Kapoor17-Mar-03 1:54 
GeneralRemove the window from the task bar while in minimized state Pin
d_kilshtein17-Mar-03 1:07
d_kilshtein17-Mar-03 1:07 
GeneralRe: Remove the window from the task bar while in minimized state Pin
Abin17-Mar-03 2:13
Abin17-Mar-03 2:13 
GeneralIs their any way Pin
Ph@ntom17-Mar-03 0:27
Ph@ntom17-Mar-03 0:27 
GeneralRe: Is their any way Pin
Rage17-Mar-03 1:18
professionalRage17-Mar-03 1:18 
GeneralOverwriting locked files Pin
jerry0davis17-Mar-03 0:23
jerry0davis17-Mar-03 0:23 
GeneralRe: Overwriting locked files Pin
Dominik Reichl17-Mar-03 0:58
Dominik Reichl17-Mar-03 0:58 
GeneralRe: Overwriting locked files Pin
jerry0davis17-Mar-03 1:06
jerry0davis17-Mar-03 1:06 

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.