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 40 41 42 43 44 45 46 47 48 49 50 51
|
#include <iostream>
#include <fstream>
using namespace std;
#include <cstring>
#include <cctype>
const int game_name = 35;
const int rating_of_game = 6;
const int platform = 30;
const int comments = 250;
const int summary = 400;
const int email = 35;
struct game_info{
char name_of_game[game_name];
char game_rating[rating_of_game];
char game_platform[platform];
char game_comments[comments];
char summary_of_game[summary];
char email_address[email];
bool availability;
};
//prototypes
void read(char prompt, int max_size, char result[]);
void getting_game_info(game_info &);
int main(){
void getting_game_info(game_info &);
}
void read(char prompt[], int max_size, char result[])
{
cout <<prompt;
cin.get(result, max_size, '\n');
cin.ignore(100, '\n');
}
void getting_game_info()
{
game_info game;
read("please enter name of game", game_name, game.name_of_game);
read("please enter the rating of the game", rating_of_game, game.game_rating);
read("please enter the game platform", platform, game.game_platform);
read("please enter your comments about the game", comments, game.game_comments);
read("please enter your summary of the game", summary, game.summary_of_game);
read("please enter your email address", email, game.email_address);
}
|