Click here to Skip to main content
15,922,015 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: MFC/C++ Pin
Hamid_RT6-May-08 1:18
Hamid_RT6-May-08 1:18 
Questionprogressbar in status bar,MFC VC++ Pin
Mohanraj D5-May-08 19:42
Mohanraj D5-May-08 19:42 
AnswerRe: progressbar in status bar,MFC VC++ Pin
Nitheesh George5-May-08 20:07
Nitheesh George5-May-08 20:07 
AnswerRe: progressbar in status bar,MFC VC++ Pin
Nibu babu thomas5-May-08 20:13
Nibu babu thomas5-May-08 20:13 
AnswerRe: progressbar in status bar,MFC VC++ Pin
toxcct5-May-08 21:54
toxcct5-May-08 21:54 
GeneralRe: progressbar in status bar,MFC VC++ Pin
Nelek6-May-08 1:47
protectorNelek6-May-08 1:47 
GeneralRe: progressbar in status bar,MFC VC++ Pin
toxcct6-May-08 1:51
toxcct6-May-08 1:51 
QuestionHow to set VC6 to fit this useness? Pin
kcynic5-May-08 19:33
kcynic5-May-08 19:33 
AnswerRe: How to set VC6 to fit this useness? Pin
Cedric Moonen5-May-08 20:20
Cedric Moonen5-May-08 20:20 
GeneralRe: How to set VC6 to fit this useness? Pin
kcynic5-May-08 20:26
kcynic5-May-08 20:26 
QuestionCSpinButtonCtrl Pin
Chandrasekharan P5-May-08 19:32
Chandrasekharan P5-May-08 19:32 
AnswerRe: CSpinButtonCtrl Pin
Rajesh R Subramanian5-May-08 20:33
professionalRajesh R Subramanian5-May-08 20:33 
GeneralRe: CSpinButtonCtrl Pin
Chandrasekharan P6-May-08 20:26
Chandrasekharan P6-May-08 20:26 
Questionupdate the value of edit box Pin
shohel8995-May-08 19:26
shohel8995-May-08 19:26 
QuestionRe: update the value of edit box Pin
Rajesh R Subramanian5-May-08 19:31
professionalRajesh R Subramanian5-May-08 19:31 
AnswerRe: update the value of edit box Pin
_AnsHUMAN_ 5-May-08 19:32
_AnsHUMAN_ 5-May-08 19:32 
AnswerRe: update the value of edit box Pin
krmed6-May-08 0:44
krmed6-May-08 0:44 
GeneralRe: update the value of edit box Pin
shohel8996-May-08 1:30
shohel8996-May-08 1:30 
Questionrelated files of CDaoDatabase Pin
includeh105-May-08 18:14
includeh105-May-08 18:14 
AnswerRe: related files of CDaoDatabase Pin
Rajesh R Subramanian5-May-08 18:35
professionalRajesh R Subramanian5-May-08 18:35 
GeneralIt is not working Pin
includeh105-May-08 19:29
includeh105-May-08 19:29 
AnswerRe: It is not working Pin
Rajesh R Subramanian5-May-08 19:34
professionalRajesh R Subramanian5-May-08 19:34 
AnswerRe: related files of CDaoDatabase Pin
Ozer Karaagac5-May-08 22:17
professionalOzer Karaagac5-May-08 22:17 
QuestionInteresting results with consts and pointers... Pin
frozenkore5-May-08 17:44
frozenkore5-May-08 17:44 
Here is an interesting bit of code:
<br />
void f(const int& i)<br />
{<br />
   int* ip = (int*)(&i);<br />
   (*ip)++;<br />
}<br />
int main()<br />
{<br />
   int i = 0;<br />
<br />
   cout << "i in main before f() is: " << i << endl;<br />
   f(i);<br />
   cout << "i in main after f() is: " << i << endl;<br />
   return 0;<br />
}<br />


and even more interesting is:

<br />
int main()<br />
{<br />
   const int i = 0;<br />
<br />
   int* ip = (int*)&i;<br />
   (*ip) = 65418;<br />
<br />
   cout << "Address of i  = " << &i << endl;<br />
   cout << "Address ip points to = " << ip << endl;<br />
   cout << "Value of i = " << i << endl;<br />
   cout << "Value ip of the address ip points to = " << *ip << endl;<br />
   return 0;<br />
}<br />
<br />


The question is, what's happening? I'm still looking into this. Just thought I'd toss is out to see what others thought.

Also, this makes for an interesting security question. If you are given pre-defined function declaration such as: void f(const int& i) or a constant reference to a struct, what keeps the coders from changing information internally.Confused | :confused:

Cheers!
AnswerRe: Interesting results with consts and pointers... Pin
Dan5-May-08 21:31
Dan5-May-08 21:31 

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.