No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I was given homework to write a program that finds if a double (64 bit) is negative. The double uses twos complement, so the first bit will tell if it is positive (0) or negative (1), but you all probably know that. The problem I am having is that there … |
|
I keep running into problems with my program to evaluate baseball stats. When I try to INPUT filename I run into glibc and if run TEAM identifier then i get a segmentation fault. The glibc didn't start happening until I put in the PLayerData.clear() statement. [code]int main( ) { vector<Player> … |
|
I can't seem to figure out why there is a segmentation fault in my copy constructor. [code]Set::Set() { Num = 0; Head = new (nothrow) Node; Head->Succ = NULL; } [/code] [code]Set::Set( const Set & A) { Node * Temp = A.Head->Succ; while ((Temp) ) { insert(Temp->Item); Temp = Temp->Succ; … |
|
I am working on a set class and I have successfully written an insert function, but I need the function to insert in an ordered fashion. [code]bool Set::insert( const EType & A ) { bool Flag = false; unsigned Position = 0; Node * Prev = Head; Node * Curr … |
|
I have to write a class for a new "home-made" string class, and I do not know how to attack the operator>> . I will provide my class constructor and what i tried... [code] String::String( const char A[] ) { char X = A[0]; int pos = 0; Length = … |
|
I have to construct a class for strings. C++ already has one, but my assignment is a home-made version. I am very lost as to how to make the constructor work. I have toyed with a few things, but I was given a header file to follow and I have … |