No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
This should display 5 lines of code that say "test", yet I am only getting 4 and it is never reaching zero, since the output never displays, "the test is over". What is wrong with this implementation? I am quite sure it's an error in my next() function. Any help … |
|
Hi, I am working on this code: [CODE]#include <iostream> using namespace std; send(to, from, count) { register int *to, *from; register int count; { register n=(count+7)/8; switch(count%8){ case 0: do{ *to++ = *from++; case 7: *to++ = *from++; case 6: *to++ = *from++; case 5: *to++ = *from++; case 4: … |
|
Hello, I am creating an implementation of LIST that displays a list of 4 elements and also displays them in reverse. It seems to be correctly displaying the first list but I am getting a segmentation fault error before it displays the reverse list and I am not sure why. … |
|
I recently wrote an implementation of STL Vector as a programming exercise. The program compiles but I receive a strange error saying: [CODE] terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc [/CODE] I've never come up with this error before and am not sure what exactly should be … |
|
So, I'm writing an implementation of List in C++ as a programming exercise, so far I have this: [CODE]#include <iostream> #include <algorithm> using namespace std; template <class T> class Link; template <class T> class List_iterator; template <class T> class List { public: typedef List_iterator<T> iterator; List(); List(const List<T> & l); … |