-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInitPlyr.cpp
More file actions
39 lines (33 loc) · 1.21 KB
/
InitPlyr.cpp
File metadata and controls
39 lines (33 loc) · 1.21 KB
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
/*******************************************************************************
* Author : Jesus Lopez *
* Assignment : Project One Initialize Player *
* Date : 11/5/17 *
* Class : CSC 17-A *
******************************************************************************/
#include "ProjHead.h"
Player* InitPlyr()
{
//Variables
Player *temp = nullptr; //Input - Pointer to dynamic structure.
//Dynamically Creates Structure
temp = new Player;
//Retrieves Player Name
cout << "First, let's start with your name."
<< endl
<< endl
<< "Enter your name: ";
getline(cin, temp->name);
//Outputs Name and Flavor Text
cout << endl
<< endl
<< "Alright, "
<< temp->name
<< " let's see if your knowledge of selling avocado toast can carry "
"over to the stock market."
<< endl
<< endl
<< "Press Enter to continue.";
cin.get();
system("clear");
return temp;
}