Search:
Type: Posts; User: KrishnaPG
Search:
Search took 0.03 seconds.
-
October 9th, 2009, 10:22 PM
If you are like me, working on serious scientifc projects, then the chances are you are required to deal with huge data, data that does not fit into your tiny 2 or 4Gb RAM. If you are looking for a...
-
October 9th, 2009, 10:12 PM
Popularily referred to as CFugue, meaning Carnatic Fugue or the C/C++ replacement of JFugue, MusicNoteLib is a high level Music Programming Library. This library makes it possible to play music notes...
-
July 13th, 2005, 10:11 AM
Dear exterminator, I got your point now and it seems valid. May be some want to implement that way.
Thankyou for clarifying.
It all depends on who you want to notify --- the end-user or the...
-
July 13th, 2005, 10:03 AM
Dear NMTop40, You are right, My bad, I had it other way round. Thanks for pointing it out.
In such case, yes, the container class can be created on heap there by making this class object aslo...
-
July 13th, 2005, 04:22 AM
Dear manish_velankani, Thanks for the Code. Good Job.
Thanking you,
Yours,
P.GopalaKrishna.
-
July 13th, 2005, 04:04 AM
Dear NMTop40, Unfortunately it is not true. When the constructor of this class is held private, there is no way objects of this class can be contained in another class.
Thanking you,
Yours,...
-
July 13th, 2005, 03:46 AM
Dear exterminator, Since the calls are resolved at run-time based on the object type (and not based on pointer type), and since at run-time there is no access checking (such as private/public etc...)...
-
July 13th, 2005, 03:38 AM
Dear humptydumpty,
You have raised a Good point. Yes, we ought to be careful with that.
Thanking you,
Yours,
P.GopalaKrishna.
-
July 13th, 2005, 03:08 AM
Dear exterminator, It seems you have some better way then, Could you please be so good as to point out that to us ?
If your concern is about returning 0 from the function, then you might want to...
-
July 13th, 2005, 02:47 AM
Dear Vedam Shashank, Ofcourse you should. The call should resolve to derived class and not base class, due to Run-time polymorphism.
Thanking you,
Yours,
P.GopalaKrishna.
-
July 13th, 2005, 02:45 AM
Dear exterminator, Are you Sure ?? Perhaps you want to check it out again..
Dear Vedam Shashank,
Since pBase pointer allows access to Derived::MyFunc(), which the class decares are private...
-
July 13th, 2005, 02:13 AM
Dear manish_velankani,
Could you be so good as to present an example you have seen that portrays the usage of overloaded new mechanism to handle graceful exits in handling out-of-memory...
-
July 13th, 2005, 01:38 AM
Dear Rigel,
Overloading new and its peers (new[], delete, and delete[]) is quite useful in restricting the way the object is created.
For example,
class OnlyStackAlloc
{
private:
...
-
July 12th, 2005, 09:05 PM
Dear NMTOP40,
Thankyou for your response.
Finally, you got it correct. Keep it up.
Thanking you,
Yours,
P.GopalaKrishna.
-
July 12th, 2005, 11:48 AM
Dear exterminator,
Thread-safety w.r.to initialization here is not defined in terms of number of times an object is initialized, but in terms of "whether the object is properly initialized by one...
-
July 12th, 2005, 11:37 AM
Dear SuperKoko,
Do not worry about the situation of invoking the constructor after assignment. Compilers are not that dumb --- they have clearly specified rules for them, Construction of object is a...
-
July 12th, 2005, 11:06 AM
Dear NMTOP40,
Thankyou for your reponse. As for your question
May be you want to answer it yourself --- afterall it was your own singleton counter code that I have modified to show you how...
-
July 11th, 2005, 08:32 PM
Dear Mr.venkyhyd,
The code you have presented involves: static Class1 *UniqueObject;
So you are using a native pointer type as a static varible, and hence its initialization does not involve...
-
July 11th, 2005, 08:03 PM
Dear SuperKoko,
There are dozens of "theoritically correct" singleton designs out there.
But if you have not forgotten, the issue of this thread is more about the "efficiency factor" ---...
-
July 11th, 2005, 12:29 PM
Dear Brad Jones,
Thank you for taking note. I appreciate your efforts in this regard.
Thanking you,
Yours,
P.GopalaKrishna.
-
July 11th, 2005, 12:15 PM
Dear NMTop40,
Thankyou for the time and efforts you have spent in providing the information, though I must admit that it is of little use to our discussion here --- as it has already been pointed...
-
July 11th, 2005, 11:59 AM
Dear NMTop40,
Are you sure? Perhaps you might want to check old posts here !!
Thanking you,
Yours,
P.GopalaKrishna.
-
July 11th, 2005, 11:39 AM
Dear NMTop40,
Yes it is a singleton counter.
The address tests of Mr.venkyhyd also confirm this.
But, as pointed out by Mr.SuperKoko, due to the hidden boolen variable involved in...
-
July 11th, 2005, 10:53 AM
Dear SuperKoko,
Thankyou for the thorough and complete explanation again.
You touched the real critical point: "Generally, compilers produce non thread-safe test code for the boolean flag! "...
-
July 11th, 2005, 05:10 AM
Dear venkyhyd,
Thankyou for brining the class - integer type difference to my attention. Now that you have mentioned it, I could see more clearly the purpose of your second code and it seems you...
|
Click Here to Expand Forum to Full Width
|