|
vikrams wrote: But here req is to have client related info, right?
What do you mean by client related information? __FILE__ and __LINE__ always gives current source file and line number.
What do mean by client here?
|
|
|
|
|
My dear friend,
Suppose I deaclared a class with is kind of function. The people who are going to use this class and function are my client. I want to provide this facility to them.But I dont want any hurdle those client like passing these __FILE__ and __LINE__ to my function to log information.I want it to do done implicitly. For example. I want to design a general purpose class for logging anything.
|
|
|
|
|
vikrams wrote: My dear friend,
:->
vikrams wrote: Suppose I deaclared a class with is kind of function. The people who are going to use this class and function are my client. I want to provide this facility to them.But I dont want any hurdle those client like passing these __FILE__ and __LINE__ to my function to log information.I want it to do done implicitly. For example. I want to design a general purpose class for logging anything.
Then maybe inline functions should help. But I am afraid as I haven't tried them myself.
But what's the purpose or reason for doing this. These macros are mainly for tracing purpose that's all.
|
|
|
|
|
macros: processed by preprosessor
After this
inline : processed by compiler
so this will not work as expected.
|
|
|
|
|
Nibu babu thomas wrote: Then maybe inline functions should help.
You forgot to put the joke icon.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
brahmma wrote: You forgot to put the joke icon.
|
|
|
|
|
You said inline functions are going help achieve what he wants. That was a joke.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
brahmma wrote: You said inline functions are going help achieve what he wants. That was a joke.
You didn't see the word maybe .
|
|
|
|
|
I am sorry. I could not stop posting. I need to tell you this.
inline has got absolutely NOTHING to do in this case.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
brahmma wrote: inline has got absolutely NOTHING to do in this case.
Yeah.
|
|
|
|
|
I guess I need some help and if possible solution. Any FUNDAS/BASIC discussion and finding the evidence of lacking it, can be taken offline. Right brahmma?
|
|
|
|
|
If you want to have this done implicitly there is no way to do it (that I know of) without macros.
Have a look in the VC++ run time library source code at how the new operator override (DEBUG_NEW) was implemented. The override provides memory leak tracking and uses the file and line number of the caller to do it which appears to be what you want.
|
|
|
|
|
|
|
Thank you very much vinsankar....
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
i want that whenever a new message open open in the outlook the first button of the toolbar is selected without affecting the selection of button on the previous page
thanks
|
|
|
|
|
Can we create a new file in the remote system using CFtpConnection, like we can open a CFile in modeCreate?
Thank you.
KIRAN PINJARLA
|
|
|
|
|
Hi,
And what do you mean by remote system ? CFtpConnection needs CInternetSession object.
If there is an FTP server - sure you can use it.
-----------
Mila
|
|
|
|
|
kiran.pinjarla wrote: Can we create a new file in the remote system using CFtpConnection...
Use the PutFile() method.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Iam using a CComboBox control for selection.When i select a different item from the list , before updating i wish to check it for some conditions set by me and if it holds ,then only i need to update it,else the selection should reset to last selection. I tried messages CBN_SELENDOK, but iam not able to make use of it.Can anyone help me to solve this out.
|
|
|
|
|
ratishmon wrote: I tried messages CBN_SELENDOK, but iam not able to make use of it.Can anyone help me to solve this out.
What exactly is the problem? What have you achieved and what are you not able to do?
My suggestion is: Handle the CBN_SETFOCUS and store the current selection state by CComboBox::GetCurSel() . Then handle the CBN_SELCHANGE and again get the new selection. Validate against your criteria. If invalid, reset it to the previous one by using CComboBox::SetCurSel()
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
It would seem a better design if potentially-invalid entries were not part of the combobox to begin with. Is this approach not feasible?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
When can be an object ambiguous?. this is one of the questions i faced in one interview. What could be the ansers friends?...
KIRAN PINJARLA
|
|
|
|
|
You lack the basics man. Read a book. Now someone can answer this question. But this won't be repeated in the interview. You need to really know the basics first.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
Mr. Bramha if u are unable to give answer of any question then don,t give any suggestions. First check ur knowledge.
sdssd
|
|
|
|