I think not.
The same guy asked about the Singleton pattern a few threads down and the correct way to implement the Singleton pattern is to declare constructors, copy constructor and the assignment operator as protected or private.
A compile time error is expected if the class implemented as a singleton is used in a way it shouldn't.
It's supposed to be hard, otherwise anybody could do it!
Regarding CodeProject: "resistance is pointless; you will be assimilated"
Is it mandatory to use KillTimer() if a SetTimer is used?
For example, i use
SetTimer(ID1,100,NULL). After 100milliseconds the timer expires and it is handled in the OnTimer() function. Now if i have to start a timer again with the same ID do i have to use KillTimer(ID1)?
From the docs for ::SetTimer. Holds true for CWnd::SetTimer too...
If the <code>hWnd </code>parameter is not <code>NULL </code>and the
window specified by <code>hWnd </code>already has a timer with the value
<code>nIDEvent</code>, then the existing timer is replaced by the new timer.
When <code>SetTimer </code>replaces a timer, the timer is reset. Therefore, a
message will be sent after the current time-out value elapses, but the
previously set time-out value is ignored.
1. Derive a Socket class from CSocket.
2. Override the OnAccept function. On Accepting the connection, call the any other function or handle it inside that function. normally we do this outside the class.
other connections will wait in the queue and will notify u again after accpetpting the first connection.
Yes, that another way of doing it. Both techniques have their pro and cons. I remember having read an article that was discussing several singleton implementations but I don't remember the link.
Yours is great when it has to be used 'alone' because as you said you don't have to worry about releasing the instance.
But in some cases, this can lead to problems: if you have a singleton that is member of another singleton, then you get into trouble because you have no control over the timings of the destruction of the instances. In such case, you need to control yourself the scope of the instances.
Geez ! It's the second time in one hour that you post your message. It's a forum here, not a chat. If you didn't get any answers, maybe it's because you don't give enough information.
As far as I know, a computer cannot send SMS. So, asking how to send SMS through VC++ is nonsense. First find something that can send SMS (for, that, I have no clue) and if you are stuck about how to communicate with this device (or whathever it is), then come back asking specific questions.
It's a programming forum here, not a phone company service .
1st thing u can send or even reecieve data through pc even through low level programmong languages i thought that u are a software developer u must know such think but any way if u dont know (Very Strange)then update ur self that pc can send or recive data through Mobile,even using VC++ .right
2nd thing i know that it is not a chat but it is really urgent thats why i m sending the messages very quickly....
Last Visit: 31-Dec-99 18:00 Last Update: 19-Sep-21 20:02