|Related to : Can eclipse autocomplete on the left side of assignment operator?|
|R-value overloaded Operator string assignment error|
The array member inside your List class is never initialized, but you
are referencing it in the += operator. Also, I presume you want an
array of NVPairs not array of NVPair pointers
Try doing something along the lines of:
template <typename T>
List(size_t maxSize) : size(maxSize), elements(0)
|Use of copy constructor and assignment operator in singleton design pattern|
That's wrong. If you receive a pointer to an internally allocated
instance, you could still make a copy of it if the copy constructor is
public. For example:
Singleton * s = Singleton::getInstance();
Singleton copy = *s; // <-- invokes copy constructor
Similar problem with the assignment operator:
Singleton * s1 = Singleton::getInstance();
Singleton * s2 = Singleton::getInstance();
|why in singleton pattern , we do make copy constructor and assignment operator as private?|
In a singleton pattern, we just want to instantiate only one object.
As you said, we we don't want the user to create/delete the singleton
object, and we also don't want the user to copy the second object.
|Difference between list assignment and tuple assignment?|
They do the same thing. A tuple is a read-only version of a list.
Usually you use parentheses (a, b) to create tuples versus square
brackets [a, b] for lists, but the parentheses can sometimes be
omitted. You could also write:
(a,b) = [1,2]
Or, perhaps most common:
a,b = 1,2
|Is that possible to create a Eclipse plug-in UI (just like a button/menu in Eclipse) to trigger a OSGi platform?|
An Eclipse plug-in would allow you to insert the Button feature. Here
you have a tutorial, however...
Eclipse is itfself built on top of an OSGi framework: Equinox. Of
course, you could embed an OSGi platform such as Knopflerfish or
Apache Felix inside, but this would be a doubtful architecture.
An Eclipse plug-in is itself an OSGi bundle, defined in a standard way
with the MANIFEST.MF file. In