... Only part of the problem is solved, the other parts are conformance of compilation standards for the whole project and also placement of the binaries being...
... Wrong is too strong a word. This will work according to the C++ standards. (Maybe checking inequality with end() might be scary on a few implementations) ...
... Would you like to use 'incorrect', instead? :-) Anyway, can you provide the section numbers of the C++ standard, so that I can cross check it? I am not...
... Not in standard c++. Which compiler are you using? Amit ===== Amit Rao Computer Graphics Dept., National Center For Software Technology, Juhu Chaos, panic,...
Hi, My 2 cents. 1. The instance would also be usually private. say private static MyClass myinstance; Example: 1) Usually we need to connect to the DB. So I...
Nadiyana, Nilesh
nilesh.nadiyana@...
Mar 1, 2004 11:04 am
4388
... Vectors occupy contiguous locations in memory and if storage capacity becomes inadequate then the vector relocates and recopies itself to another...
Hi I am having a query. I was trying writing a c++ program using template (not STL). Here is a very small piece of code. My header file looks like this ...
... No attribution! And the subject has been changed. And the message has created a new thread, when it should have continued the original thread. This is a...
hi, the template declaration and the member function code should be in the same file. it cannot be in different files to have it in different files C++...
... when the size of vector is going to change during the scope in which the pointer is used ... is there variations on which datatype of a vector can be used...
... But then the code provided by Shraddha compiles fine on Sun WorkShop 6 update 2 C++ 5.3. Will it be possible to explain why that is so? For your...
... Hi, ... I m not sure why you think its a bad usage of 'static', care to elaborate ? with static we get class-level state v/s object/instance level...
... "treated" ... choice of words a bit ambigous uhh ? 1) vector<bool> 2) when the operator new[] () is overloaded for that class. BTW, what are you hinting at...
Sue me ;-) ....point noted. I was using my Microsoft OWA remotely to access my mail and it was shit slow on a dialup connection. So every time I used to hit...
... Vector.end() ... Even if the function is inlined, it doesnt make the function any faster. For complex data structures end() is not a very fast call....
... Not quite, the intialisation of the singleton might depend on a lot of things including the availability of some features/packages. In that case the...
... Inlining a function _will_ have performance benefits (that was the whole point of your previous post.) And yes, begin() and end() can be inlined. And I...
... You have got a valid reason there. When I use anything other than Gnus on GNU/Emacs as my mail client, I too can get a little sloppy. But its nice to know...
Hi All, Recently Mani asked me this question - "Why do we need process group leaders in UNIX?" When I think about it more and more, I don't see the point of...
... Since no one was taking a swing at this one I thought I'd have a go at it :-) I feel that this example can best be equated with something like this - if a...
hi we can access static members only with class name so if evrything is static, we dont need to instantiate even single object maybe you can write small code...
... Yes, you are right, this approach doesnt work in all senarios, dint quite consider when the singleton needs to have polymorphic behavior. -rishi...
... It does make it faster, atleast in certain senarios. 1) the meth is going to be called a lot of times, like in a loop. 2) the function being inlined doesnt...
... AFAIK, static meths can be invoked via the object *or* class. ... model "everything" ... think of a server, there can be only one instance of the server,...
... size() is not a constant complexity call for all the containers, hence not neccesarily as simple. The inlining ofcourse reduces the calling cost but the...
... How did you come to that conclusion? The C++ standard says that [ X is a container type and a is an object of X ] a.begin(), a.end() and a.size() are of...