Click here to Skip to main content
15,905,028 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Working with C and C++ together in one application Pin
David Crow17-Apr-06 3:04
David Crow17-Apr-06 3:04 
GeneralRe: Working with C and C++ together in one application Pin
George_George19-Apr-06 22:44
George_George19-Apr-06 22:44 
Questionsome basic one plz Pin
Krishnatv13-Apr-06 23:45
Krishnatv13-Apr-06 23:45 
AnswerRe: some basic one plz Pin
Cedric Moonen14-Apr-06 0:12
Cedric Moonen14-Apr-06 0:12 
GeneralRe: some basic one plz Pin
Krishnatv14-Apr-06 0:38
Krishnatv14-Apr-06 0:38 
AnswerRe: some basic one plz Pin
Maxwell Chen14-Apr-06 1:44
Maxwell Chen14-Apr-06 1:44 
GeneralRe: some basic one plz Pin
toxcct14-Apr-06 1:58
toxcct14-Apr-06 1:58 
GeneralRe: some basic one plz Pin
Maxwell Chen14-Apr-06 2:07
Maxwell Chen14-Apr-06 2:07 
v2.0 wrote:
(int)value and int(value) are quite different.


But, if the case that value is just of the built-in value types like char instead of class / struct / union types?

I am using VC++ 2003 now, and I tested the code just now:
char a;<br />
int b;<br />
b = int(a);<br />
b = (int)a;<br />

As indicated in the disassembly, they are the same as below:
	char a;
	int b;
	b = (int)a;
0041F6BA  cmp         byte ptr [ebp-0E9h],0 
0041F6C1  jne         OnBnClicked+40h (41F6D0h) 
0041F6C3  push        41F708h 
0041F6C8  call        @ILT+2635(__RTC_UninitUse) (419A50h) 
0041F6CD  add         esp,4 
0041F6D0  movsx       eax,byte ptr [a] 
0041F6D4  mov         dword ptr [b],eax 
	b = int(a);
0041F6D7  cmp         byte ptr [ebp-0E9h],0 
0041F6DE  jne         OnBnClicked+5Dh (41F6EDh) 
0041F6E0  push        41F708h 
0041F6E5  call        @ILT+2635(__RTC_UninitUse) (419A50h) 
0041F6EA  add         esp,4 
0041F6ED  movsx       eax,byte ptr [a] 
0041F6F1  mov         dword ptr [b],eax 



Maxwell Chen
QuestionRe: some basic one plz Pin
David Crow14-Apr-06 2:49
David Crow14-Apr-06 2:49 
AnswerRe: some basic one plz Pin
toxcct14-Apr-06 2:51
toxcct14-Apr-06 2:51 
GeneralRe: some basic one plz Pin
David Crow14-Apr-06 3:56
David Crow14-Apr-06 3:56 
GeneralRe: some basic one plz Pin
toxcct14-Apr-06 4:01
toxcct14-Apr-06 4:01 
AnswerFrom ISO/IEC 14882:2003(E) Pin
Maxwell Chen14-Apr-06 6:51
Maxwell Chen14-Apr-06 6:51 
GeneralRe: From ISO/IEC 14882:2003(E) Pin
toxcct15-Apr-06 1:04
toxcct15-Apr-06 1:04 
QuestionHight Quality Bitmap Stretching Displaying? Pin
Abin13-Apr-06 23:29
Abin13-Apr-06 23:29 
AnswerRe: Hight Quality Bitmap Stretching Displaying? Pin
Chris Losinger14-Apr-06 2:27
professionalChris Losinger14-Apr-06 2:27 
Questionhow to create a button using DLL Pin
baldha rakesh13-Apr-06 23:16
baldha rakesh13-Apr-06 23:16 
AnswerRe: how to create a button using DLL Pin
CodeVarma14-Apr-06 19:11
CodeVarma14-Apr-06 19:11 
QuestionCreate child control Pin
zuma7713-Apr-06 23:11
zuma7713-Apr-06 23:11 
AnswerRe: Create child control Pin
Hamid_RT13-Apr-06 23:22
Hamid_RT13-Apr-06 23:22 
GeneralRe: Create child control Pin
zuma7713-Apr-06 23:47
zuma7713-Apr-06 23:47 
GeneralRe: Create child control Pin
Hamid_RT14-Apr-06 2:29
Hamid_RT14-Apr-06 2:29 
GeneralRe: Create child control Pin
zuma7714-Apr-06 4:37
zuma7714-Apr-06 4:37 
AnswerRe: Create child control Pin
Gary R. Wheeler14-Apr-06 3:26
Gary R. Wheeler14-Apr-06 3:26 
GeneralRe: Create child control Pin
zuma7714-Apr-06 4:36
zuma7714-Apr-06 4:36 

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.