Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // textbasedgame.cpp : Defines the entry point for the console application.
- //12/15/17 - Created file, following tutorial on https://levelskip.com/classic/Make-a-Text-Based-Game
- #include "stdafx.h"
- #include <iostream>
- #include <conio.h>
- #include <stdlib.h>
- using namespace std;
- int main()
- {
- //creates variable name with 50 length for array
- char name[50];
- char race[50];
- char spec[50];
- char sex[50];
- //Asks for name input
- cout << "What is your name, traveler?\n";
- cin.getline(name, 50);
- //Asks for sex
- cout << "\n Are you man, woman, or something in between?\n";
- cin.getline(sex, 50);
- //Asks for race
- cout << "What "
- //Completed character build - Text to begin next stage
- cout << "You better move fast, " << name << ". The kobolds are attacking our town!\n";
- cout << "---------------Press any key to continue-------------------";
- _getch();
- //Terminates program
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement