- Strength to Increase Rep
- +3
- Strength to Decrease Rep
- -0
- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
The folllowing code has me boggled. Here is a sample of code where you can see that the constructor for the FeetInches class is setting the numbers equal to the private variables inside... [CODE] int main() { // Define a LinkedList object. LinkedList<FeetInches> list; // Define some FeetInches objects. FeetInches … | |
I have a problem in the book (not for homework) that says. List Reverse Modify the linked list class you created in the previous programming challenges by adding a member function named reverse that rearranges the nodes in the list so that their order is reversed. Demonstrate the function in … | |
This is my code... [CODE] #include <iostream> #include <fstream> #include <vector> using namespace std; bool searchVect(vector<int>, int); int main() { bool answer; int value; vector<int> vect = {13579, 26791, 26792, 33445, 55555, 62483, 77777, 79422, 85647, 93121}; cout << "Enter the number to determine if there is a winner. \n"; … | |
I got a problem that is not for homework in the book. It states... "Total Template Write a template for a function called total. The function should keep a running total of values entered by the user, then return the total. The argument sent into the function should be the … | |
These are my three files. The header file.... [CODE] #ifndef MONTH_H #define MONTH_H #include <string> #include <iostream> using namespace std; class Month; ostream &operator<<(ostream &, const Month &); istream &operator>>(istream &, Month &); class Month { private: string month; int monthNumber; public: Month(); Month(string); Month(string, int); void setName(string); void setMonthNumber(int); … | |
I have a header file and a cpp file that i cannot get to compile. The exercise in the book states i need to make a static char of the months. But for some reason i am having trouble initializing the static char[12][25] array for the 12 months. Getting error … | |
[CODE] const char *getName() { return name; } [/CODE] Looking at the following code which is a member function of a class, why would one pass the array of a person's name as a pointer and lock it so it cannot be modified when they can just pass a copy … | |
I basically got all the errors out of this software program i am doing for my own study, not for school. But i keep getting an error saying that in the main program before the cout it is missing a ;. This leads to believe i am missing a ; … |