No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hi all... For a project I have to create a small program that adds class data using templates. I've completed the project, but the output is not expected for the last cout in main. Here is the code: [code=cplusplus] #include <iostream> #include<string> using namespace std; template <class T> T add … |
|
Hi all - hope your weekend is going well. I've got the following code. It compiles, but gives a warning about a stack overflow error in the istream& operator function. When running the program, it just continuously outputs "Enter ID for student." What am I missing that makes this recursive? … |
|
I cannot get this program to compile. It is bombing at the Outfit::Outfit constructor. I am getting an error stating that it is missing argument list and also illegal left operand type. Can someone point me in the right direction? Cheers - Jason [code=c++] // Outfit class contains Dress and … |
|
Hello everyone....again. I have a program that is using a queue. I have a class member function that is to traverse the queue, and output the smallest number in the queue. Pseudo for this function is: Compare the front and front->next. Whichever is smaller, keep it. Traverse the queue until … |
|
Re:
I'm having trouble inserting a bubble sort for my program, any help would be appreciated. #include <iostream> #include <string> using namespace std; int main() { string food[100]; string lookup; int calories[100]; int x = -1; do { x++; cout << "Enter a menu item (enter 'done' when finished): "; getline(cin,food[x]); … |
|
To any and everyone :) As stated in my title, this is a homework assignment, so I appreciate any help or suggestions that are given. Also, per the website rules, I have put effort to this, and I'm not asking anyone to just do my work. (The program compiles and … |
|
Re:
Below is the code I am starting with. What is desired is to have the user input the number of players and the number of scores and then populate the players and scores. To check the program out I usually will use random numbers for the scores. My problem is … |