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 am trying to count the characters in a linked list. I am receiving a compiler error when this function is tested... **invalid types `char[int]' for array subscript ** [CODE]int slist::count_c(char c) const { slistelem* temp = h; int count = 0; for (int i = 0; i != '\0'; … | |
I am trying to change the default value in a print function so that n > len, however, when I do so, the output has garbage at the end of it. How do I properly get rid of the extra characters? [CODE]#include <iostream> #include <assert.h> #include <cstring> using std::cout; using … | |
//I am trying to use the reverse function but only get garbage when trying to print s2. How do I properly assign s2 a value in order to print it in main? #include <iostream> #include <string> using namespace std; class ch_stack { public: void reset() { top = EMPTY; } … |