baronvongogo
Fully Optimized
- Messages
- 2,756
- Location
- United Kingdom, Warrington
its not liking the main I normally do:
int main()
OR
void main()
such as:
#include <iostream>
#include <string>
using namespace std;
int main ()
{
unsigned int Age;
int StartEnergy;
string CharacterType;
/* Get the Information */
std::cout << "What is your Character's Age?: ";
std::cin >> Age;
std::cout << "How much start Energy?: ";
std::cin >> StartEnergy;
std::cout << " Character Race?: ";
std::cin >> CharacterType;
/*Show the information */
std::cout << "Your chacter is " << Age << " years old." << std::endl;
std::cout << "Has " << StartEnergy << " of starting energy." << std::endl;
std::cout << "And its race is " << CharacterType << "."<< std::endl;
system("pause");
return 0;
I changed some of your program mainly the variable types made age an int and startenergy. Also the character type as a string so it would display the whole thing although learning how to use chars would be more beneficial . I also put a system("pause") in your code so it wouldn't exit straight away and you could see the last info screen.
int main()
OR
void main()
such as:
#include <iostream>
#include <string>
using namespace std;
int main ()
{
unsigned int Age;
int StartEnergy;
string CharacterType;
/* Get the Information */
std::cout << "What is your Character's Age?: ";
std::cin >> Age;
std::cout << "How much start Energy?: ";
std::cin >> StartEnergy;
std::cout << " Character Race?: ";
std::cin >> CharacterType;
/*Show the information */
std::cout << "Your chacter is " << Age << " years old." << std::endl;
std::cout << "Has " << StartEnergy << " of starting energy." << std::endl;
std::cout << "And its race is " << CharacterType << "."<< std::endl;
system("pause");
return 0;
I changed some of your program mainly the variable types made age an int and startenergy. Also the character type as a string so it would display the whole thing although learning how to use chars would be more beneficial . I also put a system("pause") in your code so it wouldn't exit straight away and you could see the last info screen.