Recent content by WarGhSt
-
W
Creating Objects within a Class
I'm afraid I'm not seeing what I can do here. I've tried creating objects inside the class but I'm doing it wrong, I suppose. It's probably very simple. I just am not getting it.- WarGhSt
- Post #5
- Forum: Programming and Computer Science
-
W
Creating Objects within a Class
Think I've done it! Could you take a look? class Billing { private: double bill; string trainer; string athlete; public: Billing(string athleteIs, string trainerIs, double bil){ athlete = athleteIs; trainer = trainerIs; if (bil > 0) { bill =...- WarGhSt
- Post #3
- Forum: Programming and Computer Science
-
W
Creating Objects within a Class
Working on a project here - I've got the classes [MINUS Billing] defined and, as far as I know, meet the requirements for the constructors, accessors, and mutator functions. My problem lies with the Billing class. It asks me to create an athlete and trainer object inside the billing class but...- WarGhSt
- Thread
- Class
- Replies: 6
- Forum: Programming and Computer Science
-
W
Debugging I/O Assignment: Structure Logic & Solve Problems
void displayServices(int x){ ifstream objectFile("services.txt"); string service1; string service2; string service3; string service4; int serviceValue; if (objectFile.is_open()) { while (!objectFile.eof()) { getline(objectFile...- WarGhSt
- Post #3
- Forum: Programming and Computer Science
-
W
Debugging I/O Assignment: Structure Logic & Solve Problems
Since this is turning out to be like my last post and garnering few if any replies, I'll try breaking it down to what I'm currently working on again. In my input from file function I would like to take the line from each service and store the valuable as a string (separate string for each)...- WarGhSt
- Post #2
- Forum: Programming and Computer Science
-
W
Debugging I/O Assignment: Structure Logic & Solve Problems
Working on an I/O assignment and I'm running into some logic errors. I was wondering if I could get a quick break down (not necessarily code, but the pseudo code behind some of these points I'm supposed to be working on. That way I don't get spoiled with the answers, but have enough to go on...- WarGhSt
- Thread
- Assignment
- Replies: 2
- Forum: Programming and Computer Science
-
W
Structure design for storing book data with arrays
Got part 2 working with this super long strip of code. else if(menu == 2) { int genreB = 0; int genreC = 0; int genreF = 0; int genreM = 0; //displays how many books per genre if (bookList.at(0).bookGenre == 'B') { genreB = genreB +...- WarGhSt
- Post #6
- Forum: Programming and Computer Science
-
W
Structure design for storing book data with arrays
For part 2, would defining the genres (B, C, F, and M) as integers work? And then I could call the value from each vector position for bookGenre, if it were = to B, C, F, or M add +1 and then print the value of the int? Is my logic sound? I've tried running it this way, but I can't seem to...- WarGhSt
- Post #4
- Forum: Programming and Computer Science
-
W
Structure design for storing book data with arrays
Okay, a second set of code which gives me a menu. Hopefully this will draw some more attention so I can get some help. I'm putting in an effort, I truly am! I could use some help with menu option 2, 3, and 4. #include <iostream> #include <vector> #include <string> using namespace std...- WarGhSt
- Post #3
- Forum: Programming and Computer Science
-
W
Structure design for storing book data with arrays
I've given up on this front of coding. Post 3 is where I currently am at. I think it is modeled better to see me to the end. Okay, I've got some code to go along with it. But it's very basic and I don't think it will carry me to the end of this. Especially with the requirement for genres...- WarGhSt
- Post #2
- Forum: Programming and Computer Science
-
W
Structure design for storing book data with arrays
So, like the title says, I'm doing another project. The kicker this time is that I don't even know how to start. Last time I was able to post some code I had already messed around with (and messed up) but this one I'm not even sure how to begin. I've already done some of the work with...- WarGhSt
- Thread
- Project Structures
- Replies: 5
- Forum: Programming and Computer Science
-
W
Swimming skill level program needs loop logic for cumulative totals
Going backwards, I can see exactly how all this fits together. Coming up with it on my own, however, is still a long way out! Thank you very much for the time you spent helping me out!- WarGhSt
- Post #6
- Forum: Programming and Computer Science
-
W
Swimming skill level program needs loop logic for cumulative totals
Yes, I'm following.- WarGhSt
- Post #4
- Forum: Programming and Computer Science
-
W
Swimming skill level program needs loop logic for cumulative totals
Copy pasted some of the variable definitions from another program at one point - that's why the comments following them don't match up with what the program is doing. Lol- WarGhSt
- Post #2
- Forum: Programming and Computer Science
-
W
Swimming skill level program needs loop logic for cumulative totals
#include <iostream> #include <string> using namespace std; int main(){ // int i = 0; // Loop counter iterates numRolls times // int j = 0; // loop counter for histogram string studentName; // User defined number of rolls int swimLevel = 0; // Tracks number of 6s...- WarGhSt
- Thread
- Replies: 5
- Forum: Programming and Computer Science