June 17th, 2009, 08:42 PM
I found a way to stop the error, but it's totally a hack. If I comment out the deconstructor , the error goes away. I know that's horrible practice, though. What kind of mistake does the faulty...
June 17th, 2009, 06:38 PM
I guess that makes sense. =P
The error still isn't going away. To see whether or not it had anything to do with the operators, I commented all the overloaded assignment operators out and still got...
June 17th, 2009, 06:28 PM
I took your advice. Now I have this:
key& key::operator=(const key &rhs)
{//This operator sets this.length = rhs.length, deletes and recreates the dynamic arrays, and copies the dynamic arrays...
June 17th, 2009, 05:40 PM
I fixed that now. My key operator looks like this:
class key
{
//code
key & operator=(const key &rhs);
//code
}
June 17th, 2009, 05:13 PM
I created the following class. Whenever the overloaded assignment operator is called, the program seems to deconstruct the object immediately afterwords. Whatever is actually happening, I...
June 15th, 2009, 12:31 PM
Thanks, guys! I put a constructor in my structure like you suggested, and it worked. :D
June 15th, 2009, 12:16 PM
I created a structure, and its members are objects that require a constructor with an argument to be called to work. How do I call the objects' constructors when I declare an instance of the...
December 14th, 2007, 09:52 PM
I want to open a file (using fstream) relative to the directory that the program is run from. How do I do this?
Please don't go too fast with me. I'm taking an introductory C++ class and although...