|
Thank u so much man.. .. i'm so happy
V
|
|
|
|
|
Morning, all
Is it necessary to set the pointer to NULL after delete everytime in C++?
It would cause memory leak by just delete and NOT set to NULL, right?
Thank you!
|
|
|
|
|
valerie99 wrote:
Is it necessary to set the pointer to NULL after delete everytime in C++?
if you're about using the pointer variable again and want to be sure not to use an invalid memory block, yes, set to null.
valerie99 wrote:
it would cause memory leak by just delete and NOT set to NULL, right?
how ????
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
valerie99 wrote:
Is it necessary to set the pointer to NULL after delete everytime in C++?
It's not required, but it is recommended.
valerie99 wrote:
It would cause memory leak by just delete and NOT set to NULL, right?
No, not at all. The memory is freed within the delete operator. Setting the pointer to NULL afterwards is just a precautionary measure.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
valerie99 wrote:
Is it necessary to set the pointer to NULL after delete everytime in C++?
No, but it is considered "a good programming practice".
valerie99 wrote:
It would cause memory leak by just delete and NOT set to NULL, right?
No. It would not.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
valerie99 wrote:
It would cause memory leak by just delete and NOT set to NULL, right?
Out of curiosity, did you happen to program in a garbage collected environment?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi,
I'm using the COleDateTime control to allow the user to set the date.
My question is : How can i get the selected date by the user?
I know i should handle the MCN_SELECT message'but i don't know how to get the
selected date.
Anyone?
Regards,
Eli
|
|
|
|
|
eli15021979 wrote:
How can i get the selected date by the user?
By using any number of the Getxxx() methods:
GetMonth()
GetDay()
GetYear()
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hi David,
First,Thanks for your prompt reply.
I tried the Getxxx() method but the give me the current system time and not the selected date.
Regards,
Eli
|
|
|
|
|
This makes no sense. A COleDateTime object represents whatever date you set it to, be it some past date, the current date, or some future date The concept of 'selecting' a date, much like you would with a UI component, does not exist. You can 'set' the date, however.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hi David,
Thanks again for your answers.
It's my mistake - I've set the control class member to COleDateTime instead of CMonthCalCtrl.
with CMonthCalCtrl I can use the GetCurSel() to get the selected date.
With besr regards,
Eli
|
|
|
|
|
eli15021979 wrote:
with CMonthCalCtrl I can use the GetCurSel() to get the selected date.
Makes much more sense. Glad you are working now.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hi all !
I have developed the application. in my main class, I call 8 thread . The main class must to wait all 8 Thread end to continute do something. How to known all 8 Thread ended ?
pls, help me !
Thank alots
|
|
|
|
|
You can use the WaitForMultipleObjects function using HANDLEs to your threads and setting bWaitAll to TRUE.
|
|
|
|
|
Take a look at WaitForSingleObject in the MSDN[^]
|
|
|
|
|
Don't you mean WaitForMultipleObjects() ?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Yes, but it's monday so you have to be indulgent
I tried to modify my post but I was unable to do it.
|
|
|
|
|
|
Hello everybody?
I am trying to know how I can detect changes in data streams.
But I don’t have any practice this field.
I found 1 paper and read it. But I didn’t understand fluently it. ( http://www.cs.technion.ac.il/~shai/vldb04.pdf)
If you have any idea about detecting changes in data streams, can you help me?
Also can you explain to me algorithm that presented paper?
What is distance anything?
My e-mail address is u_bulga@yahoo.com.
Thank you so much for your help.
Thank you
|
|
|
|
|
ah ah ah
well, don't move, i do it for you, and i send it into you check box, this way, nobody will benefit the work, and you will be the only owner after that...
do you really think an email is welcome on a forum where SHARING is the word ???
moreover, for a first post, i find it of a very bad gust : how many forums are you going to cross post[^] ?
get out of here and do your homework yourself !
sorry, but i had to vote you down
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
My english ability is so bad. So I didn't understand that paper and algorithm.
If you understand it can you explain to me pls?
|
|
|
|
|
how can i trick a sdi application in such a way so i can insert a dialog area next to it ? or... what to do to insert that sdi aplication, over a dialog form ?.... My application has to be a Windows Explorer embedded on a dialog form, that has several others buttons on it... so... i have found an aplication simillar with what i need... an Windos Explorer kind .. but it's a SDI using a splitter... is there any simple way for gettin that on the Dialog's area ?
I need to make it done in VC6.0 !
Thanks
|
|
|
|
|
You could add another splitter pane for the dialog or use a CDialogBar. There are probably many more ways to go.
|
|
|
|
|
|
Anyone know how to do this?
I've tried calling CMultiDocTemplate::OpenDocumentFile() with bMakeVisible=FALSE but how do you then initialize and show the window correctly *without* bringing it to the front.
Or is there another way?
The two most common elements in the universe are Hydrogen and stupidity. - Harlan Ellison
Awasu 2.1.2 [^]: A free RSS reader with support for Code Project.
|
|
|
|