Search:
Type: Posts; User: kahahn
Search:
Search took 0.04 seconds.
-
I found what seems to be authoritative confirmation of your assertion at http://fscked.org/writings/225notes/week1/week1.html (scroll down to or search for "new and delete").
So my-bad for...
-
Adding the bool would not be sustainable because there is also a join function, and the number of pieces I'd have to keep track of would grow as the ops were iterated.
The original intent was to...
-
Sorry -- I meant
q = & p[numofints];
K.
-
I have a question about the deletion of dynamic memory. Please look at the following code:
class myClass {
private:
int numofints; // assume to be always even
int *p;
int *q;
-
June 29th, 2009, 09:21 AM
The motivation was because, for example, if I have a number of similar algebraic types -- say real types of various precisions -- there are some functions I'd like to do that are common to all of...
-
June 26th, 2009, 03:36 PM
After my last post I ran some variations on the test code in the post. Some of the variations that I expected to work compiled ok but caused internal errors (i.e. program crash).
I am giving up on...
-
June 26th, 2009, 01:36 PM
I have tried the following test:
test.h:
#include <stdlib.h>
class baseClass {
public:
virtual baseClass myMethod() {throw 0xfff; } // LINE 4...
-
June 26th, 2009, 09:19 AM
:-( So the polymorphism model is not quite complete in C++ as it is in Java or C#. Drat. I'm going to have to redo my design here. Thanks for the info. At least I found this out before getting too...
-
June 24th, 2009, 12:54 PM
Compiler = Vc .NET 2003
I like the template idea. Thanks.
K.
-
June 24th, 2009, 12:19 PM
Error message was "binary '+' no operator found that takes right-hand operator of derivedClass"
First let me explain my objective. I am developing a high-precision algebra package (will allow...
-
June 24th, 2009, 11:34 AM
I guess what has me befuddled on this is that it seems to violate the principles of polymorphism. Operator functions should be no different than other functions with regard to polymorphism. Suppose...
-
June 23rd, 2009, 04:49 PM
I am still dusting off long unused C++ skills. Why does the compiler not like the following operator overload?
class baseClass {
public:
virtual baseClass & operator+=(const baseClass & b)...
-
June 22nd, 2009, 10:29 AM
Thanks for your suggestion on the specifics of extending string (and why it's a bad idea). I will consider your suggestion seriously.
On the more general problem of extending constructors, after...
-
June 22nd, 2009, 10:04 AM
I would like to extend the ANSI string class to include rudimentary split and join functions. I am NOT adding any new data fields to string:
class string_sj : public string {
public:
...
}
-
June 17th, 2009, 11:21 AM
I also tried making specialMember a pointer and doing
specialMember = new myClass(this);
inside of the ourClass constructor. This is probably better coding practice, but it also means that...
-
June 17th, 2009, 11:01 AM
Thanks to all who responded. I got a variation of the first suggested solution to work under VC .NET 2003.
-
June 17th, 2009, 10:01 AM
Suppose I have two classes, and one will become a member of the other:
class ourClass;
class myClass {
public:
myClass(ourClass *parent = NULL);
}
class ourClass {
|
Click Here to Expand Forum to Full Width
|