c++ structure

Lost original Post

Hello Daniel SHobe,

And your question or problem is?

One possible answer is 42 https://www.youtube.com/watch?v=aboZctrHfK8

Also look at http://www.catb.org/esr/faqs/smart-questions.html

Edit:
Last edited on
Normally I'd ask what you need help with, but here you go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Example program
#include <iostream>
#include <string>
#include <vector>

struct MonetaryAmount {
    int dollars_mult100; // 1999 = $19.99
};

struct Service {
    // ???  
};

struct Date {
    int year;
    int month;
    int day;
};

int main()
{
    // write c++ source code using the following information
    std::string Movies_Information = "Christmas Movies";
    std::string Movie_Title = "Die Hard";
    std::string Movie_type = "Action";
    Date Date_of_release = {1998, 7, 15};
    MonetaryAmount Production_cost = { 4200000 };
    MonetaryAmount Ticket_cost = { 750 };
    int Rating = 3;
    std::vector<int> Seat_numbers = {1, 2, 3, 4, 5};
    std::vector<Service> Services_to_compute(5);
    
    int Total_sales = 42;
    MonetaryAmount Profit = { 89000000 };
    int Rank = 42;
    int Total_num_people = Total_sales; // who watched the movie, (based on no. of sold tickets)
    
    int Num_times_movie_watched = 1000;
}


That is not "a problem". That is "your homework".

If you make no effort on writing the code, then you have no chance to learn.
The one, who assigned you homework, wants you to learn.

We want you to learn too. Therefore, we cannot write code for you.

We can help, if you do encounter a problem in your code.
Hello Daniel SHobe,

First you could take this:

• Movies Information
 - Movie Title
 - Movie type
 - Date of release
 - Production cost
 - Ticket cost
 - Rating
 - Seat numbers


And turn them into variables. As with Ganado's suggestion you might consider using a struct to hold all these variables. It makes it easier to pass around the struct if you use functions. Otherwise it could be used to keep everything in one place.

Next you will need the code to put information into these variables.

Work on the program in small steps. This way it will not seem overwhelming.

From my side of this I have no idea what you know nor does anyone else. Do you know about structs? Functions? Using multiple files for a project?

It is difficult to help you when no one knows what you can do.

Work on this small part and get it working. Until you have information to use writing the rest of the program is mostly pointless as you will have a hard time knowing if it is correct.

Hope that helps,

Andy
The question is honestly phrased horribly. Seat numbers? But what the heck is that supposed to be??
There's no information given on how to "compute" total sales & profit, number of people who watched the movie, number of people who have watched the movie.

Can't be about just taking inputs.. because they say "compute"..

Daniel SHobe can you please post the original question, if what you wrote was in your words?
Seems to be a question with class/struct objects, so the "Movie information" details are the datamembers of a class.

But I don't get what Seat numbers is or the what you're supposed to do with the "services to compute".
Last edited on
Transform the images....? What are you talking about. That had nothing to with your original post. (ignore, it was just a random spam post, unrelated to the thread)

Also, whoever reported the OP ("Daniel Shobe")'s post is ABUSING THE SYSTEM.
STOP IT.
Last edited on
I guess we will never know why Daniel SHobe's account has been limited and we have lost the OP.

Maybe we will see it back some day.
So an account gets banned after it gets two of its posts reported? That can be so abused.. I hope somebody checks the reports.. Well because I've never seen a post from the administrator (last post 2012)..

Sorry this happened to you Daniel Shobe, you shall be remembered forever.. in our hearts. ;'[
(and he makes a new account to say hi, lol)
Topic archived. No new replies allowed.