D
Daniel =?iso-8859-1?Q?Lidstr=F6m?=
Hello,
why am I not allowed to put const keyword on memberfunctions as such:
public __gc class C {
public:
int get() const;
};
?
Also, if I return a pointer to as String, do I have to add const to make it
non-changeable? For example:
public __gc class C {
public:
System::String* get() { return s; }
System::String* s;
};
What happens if I do:
C* c;
c->s = "string";
c->get() = "vector"; // can't compile it
Sorry if these are simple questions...
why am I not allowed to put const keyword on memberfunctions as such:
public __gc class C {
public:
int get() const;
};
?
Also, if I return a pointer to as String, do I have to add const to make it
non-changeable? For example:
public __gc class C {
public:
System::String* get() { return s; }
System::String* s;
};
What happens if I do:
C* c;
c->s = "string";
c->get() = "vector"; // can't compile it
Sorry if these are simple questions...