Hi,
I'm currently stuck on a problem involving returning an object using a function.I'm very ashamed I can't get this problem on my own, so I was wondering if any users here could possibly point me in the right direction. Be forewarned this is rather lengthy, so will do my best to explain.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
class set{
public:
set(){};
set(string* q){
string* p = q;
};
set set_union(set otherSet ) {
/*
int j = cardinality();
int i = otherSet.cardinality();
int k = i + j;
int l = k -i;
int l2 = k -j;
*/
string s[100];
string * u ;
u = s;
return set(u);
// The /* */ is just blocked out code that will be used to combine sets.
};
|
With this code segment I get an error
In copy constructor `std::basic_ios<char, std::char_traits<char> >::basic_ios(const std::basic_ios<char, std::char_traits<char> >&)':
<more errors>
Then a very strange thing happens.
I get a file named
ios_base.h with a highlighted line at this part
1 2 3 4 5 6 7 8 9 10 11
|
<more code above>
/ _GLIBCXX_RESOLVE_LIB_DEFECTS
// 50. Copy constructor and assignment operator of ios_base
private:
ios_base(const ios_base&);
ios_base&
operator=(const ios_base&);
<more code below>
};
|
The file that is opened is a rigorous 927 lines of code I can't grasp with my current knowledge of the langue.
In attempting to trouble shoot this issue, I believe this is what be wrong, but can't confirm via Google/c++ book/ data structures book.
(Now, I do get a website for the actual large error message, but the context of the page is for iostreams.)
I believe it is either
1. Compiler is wrong, unlikely.
or
2. I ignored some very important rule of the language as the ios_bas.h appearing.
However, I'm assuming IOS here means input output stream, but the problem isn't with that as the file is being read correctly...
Total time debugging: 10 hours.
Total time coding whole file(not being scene): 13 hours.
No, complaints though have learned a lot!
Any pointers on this problem(no pun attended)?