|
|
echeshari wrote: ...solving electronic circuits in computer
Please elaborate.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hie,
can I put __FILE__ and __LINE__ macros inside the class function which may not be inline. And
void function()
{
classobject::LogInfo(...);
}
Internally LogInfo should log file name and line number. Here I dont want user to pass those macros and also dont want to use any macros.
Is there any soln?
vikram S
|
|
|
|
|
vikrams wrote: can I put __FILE__ and __LINE__ macros inside the class function which may not be inline.
Why not!
vikrams wrote: Internally LogInfo should log file name and line number. Here I dont want user to pass those macros and also dont want to use any macros.
Is there any soln?
__FILE__ and __LINE__ macros should suffice. These macros can be used anywhere. I don't know if there is any other way.
|
|
|
|
|
Here the context is important. Those macros are used inside function of a class. Which will be replaced by appropriate values by preprocessor.So Everytie I will get my code line and file name only. But here req is to have client related info, right?
|
|
|
|
|
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.
|
|
|
|