title: Function must return a value
body: <p>I am trying to make a text based RPG and i'm fairly new to c++. I understand that I need to return a value, but when I try and return CharacterName or CharacterRace it comes up with unresolved externals errors. I'd really appreciate the help guys, thanks :) </p>
  
  <p>CharacterCreation.h</p>
  
  <pre><code>#include &lt;string&gt;
  #include &lt;iostream&gt;
  
  void petc(), ConsoleClear(), petc(), EnterClear();
  
  std::string CharacterName, CharacterRace;
  </code></pre>
  
  <p>Main.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;limits&gt;
  #include &lt;string&gt;
  #include &lt;string.h&gt;
  #include "CharacterCreation.h"
  
  std::string CharacterCreation();
  
  
  int main()
  {
      CharacterCreation();
  
  }
  
  
  
  std::string CharacterCreation(int RaceChoice, int RaceChoiceLoop)
  {
  
  RaceChoiceLoop = 0;
  std::cout &lt;&lt; "Welcome to the character creation V 1.0.0" &lt;&lt; std::endl;
  EnterClear();
  std::cout &lt;&lt; "Choose a name: ";
  std::cin &gt;&gt; CharacterName;
  std::cout &lt;&lt; CharacterName &lt;&lt; std::endl;
  
  EnterClear();
  
  while (RaceChoiceLoop == 0)
  {
  
      std::cout &lt;&lt; "(1) Human - Human's race perks: + 5 to Magic | + 1 to         Sword Skill" &lt;&lt; std::endl;
      std::cout &lt;&lt; "(2) Elf - Elve's race perks: + 5 to Archery | + 1 to Magic" &lt;&lt; std::endl;
      std::cout &lt;&lt; "(3) Dwarf - Dwarven race perks: + 5 to Strength | + 1 to Archery" &lt;&lt; std::endl;
      std::cout &lt;&lt; "Choose a race, " &lt;&lt; CharacterName &lt;&lt; ": ";
      std::cin &gt;&gt; RaceChoice;
  
      if (RaceChoice == 1)
      {
          RaceChoiceLoop = 1;
          CharacterRace = "Human";
      }
  
      else if (RaceChoice == 2)
      {
          RaceChoiceLoop = 1;
          CharacterRace = "Elf";
      }
  
      else if (RaceChoice == 3)
      {
          RaceChoiceLoop = 1;
          CharacterRace = "Dwarf";
      }
  
      else
      {
          std::cout &lt;&lt; "Invalid Option";
          EnterClear();
          RaceChoiceLoop = 0;
  
      }
  
  }
  
  
  
  
  
  
  }
  
  
  
  void petc()
  {
      std::cout &lt;&lt; "Press Enter To Continue...";
      std::cin.ignore(std::numeric_limits&lt;std::streamsize&gt;::max(), '\n');
  }
  
  
  
  
  void EnterClear()
  {
      std::cout &lt;&lt; "Press Enter To Continue...";
      std::cin.ignore(std::numeric_limits&lt;std::streamsize&gt;::max(), '\n');
      system("cls");
  
  }
  
  
  
  void ConsoleClear()
  {
      system("cls");
  }
  </code></pre>