How to call this function?
So I am at the beginning of my task and I need to call function "creating" inside the main function...How to do it? This is my code.
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
|
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
struct travel {
string route;
string ship_name;
string captain_name;
int price_1;
int price_2;
int passengers_1;
int passengers_2;
int sold_tickets;
};
void creating ();
void display ();
void display_tickets ();
int main()
{
cout << "1.Inserting" << endl;
cout << "2.Displaying" << endl;
cout << "3.Displaying (tickets)" << endl;
int choice;
cin >> choice;
switch (choice)
{
case 1: creating();
}
}
| |
Topic archived. No new replies allowed.