|
-
May 28th, 2002, 06:03 PM
#1
Problem with string in copy constructor?
I have a class with only a string and a bool data type. In the copy constructor it says:
name = v.name;
marked = v.marked;
(name is the string and marked is the bool, v is var from copy constructor)
When I run the program it works except when I get to a part that would normally call the copy constructor, I error and goto the debugger. In the debugger it points to windows code, and says its in the assign function of string.h. I can't understand whats going on or try. But when I look to see what called the assign in string.h its my copy constructor (above)...
Anyway, anyone else had this problem or maybe a solution for me to try?
Thanks!
NOMAD
-
May 31st, 2002, 02:35 AM
#2
It seems that the strings in v are invalid, causing the string assign operator to assert.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|