|
i knw tht..But it's a question i was asked at an intw
|
|
|
|
|
where did you give the interview?
-Prakash
|
|
|
|
|
Well, since you use the term "throw", then I assume f3 will throw an exception on error, not return an error code. If so, then neither f2 or f1 will be executed. If you mean that f3 returns an error code, then you must check the values before passing them to f1.
This is really elementary C++, so I wonder: 1) Do they really ask such questions at interviews? 2) have you not done your homework?
--
The Blog: Bits and Pieces
|
|
|
|
|
I dont think that so simple if it was
asked to a experienced person . Have u
ever experimented the real result?
http://www.parashift.com/c++-faq-lite/
go throught this link its good for interview
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
hi,
I am trying to compile a vc6.0 project in vc8.0. I am getting the following error.
error C2061: syntax error : identifier 'THIS'
I tried to use #undef THIS and #define THIS. But it didnt work. Is it possible that old windows files are getting linked. In that case as well the definition of 'THIS' hasn't changed and its the same.
Can anyone suggest a fix?
regards,
sk80.
|
|
|
|
|
Shouldn't it be lower case (this)?
|
|
|
|
|
I wonder if there is a MACRO somewhere in your code that uses 'THIS' in place of 'this'? Search for all references to 'THIS' -- what do you get?
Read more of what I have to say at http://directx9.blogspot.com/
|
|
|
|
|
I would like to know how to change the Background color of AfxMessageBox?
Please help!
|
|
|
|
|
Here is an excellent sample...
Download the CtlColor Explorer from this page....
http://www.flounder.com/download.htm[^]
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Thank you very much!
Could you give me more hints?
Please help!
|
|
|
|
|
I can give a keyword for further searches....
MSGF_DIALOGBOX.
When a dialog comes up this is the message sent. You can trap this in WM_ENTERIDLE message handler. Check for this message inside the handler for WM_ENTERIDLE. This is in wParam argument.
If this is the case then lParam will have Handle to the dialog box or message box. Rest is up to you. He he.
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Thank you very much!
I search some messages.
They suggest to write a dialog box for it.
I use this method now!
|
|
|
|
|
|
First off, what and why do you want to do ?
-Prakash
|
|
|
|
|
It was asked in an Interview. I suggested using pragma's. They asked how to do without that.
Still confused...
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Owner drawn wrote: It was asked in an Interview.
yes i suspected that.
well i am not too sure, may be declare my own entrypoint to the linker.
-Prakash
|
|
|
|
|
declare a global static function.That'll execute before main.I was once askd a similar qs,hw to crash your prg before executing main !! dunno why he wanted that
|
|
|
|
|
but how would you make that global static function to execute first before the main?
-Prakash
|
|
|
|
|
But how to call it before main is called...
LOL
These interview fellas are real funny...Any question they don't know they will throw it at us...;)
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
I have the answer but only if
u give me bunch of c++ & MFC
question answers or some
website for it.
That is just i am putting up a site which
contains such Q & A .
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
vikas amin wrote: I have the answer but only if
u give me bunch of c++ & MFC
question answers or some
website for it.
Clever deal buddy...
But I can't help. The other questions I forgot. This was asked sometime back.
Forgot the rest.
Today i remembered this coz of a friend. If you can help, will be nice .
After you finish please send the site address. ATB.
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
It really a clever trick in c++
u need to create a global object with a
constructor .
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
vikas amin wrote: It really a clever trick in c++
Nothing clever. It is trivial in C++. Everybody knows that. I want to do the same in C buddy.
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
ok
U will be happy that i worked out the problem sucessfully
:->
put up a function in ur main function call which return int
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
vikas amin wrote: put up a function in ur main function call which return int
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|