Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 28 Feb 2013
Offline Last Active Feb 28 2013 06:13 PM

Topics I've Started

C++ help

28 February 2013 - 03:47 PM

Hey guys i'm 14 and i'm just starting to learn c++. I have an rpg intro i'm working on but it wont compile or run. would any of you be able to point out any issues?:



#include <iostream>
#include <cstring>
using namespace std;
int main()
char name[50];
char weapon[100];
char weapon_name[100];
cout<<"What do you want your hero's name to be?";
cin.getline (name, 50);
cout<<"I like that name!";
cout<<"What would you like your weapon to be?";
cin.getline (weapon, 100);
cout<<"That's my favourite weapon!";
cout<<"What would you like to name your weapon?";
cin.getline (weapon_name, 100);
cout<<"You shall be crowned: "<<name<<"the wielder of the"<<weapon<<"named"<<weapon_name";
cout<<"You may begin your adventure!\n";
Thanks for your help!