title: Calling a Static Method, Getting error: LNK2019
body: <p>I'm having some troubles making a string utility class that has only static methods. Whenever I use a calling class to use a static method in my string utility class, it compiles with an LNK error, 2019. Any help would be much appreciated.
  .h is below,</p>
  
  <pre><code>#pragma once
  #include &lt;string&gt;
  #include "stdafx.h"
  #include &lt;iostream&gt;
  using namespace std;
  static class StringUtil
  {
  public:
      static string Reverse(string);
     // bool Palindrome(string);
     // string PigLatin(string);
     // string ShortHand(string); 
  private:
     // string CleanUp(string);
  };
  </code></pre>
  
  <p>.cpp file is below,</p>
  
  <pre><code>   #include "StdAfx.h"
     #include "StringUtil.h"
     #include &lt;iostream&gt;
  
  static string Reverse(string phrase)
  {
      string nphrase = "";
      for(int i = phrase.length() - 1; i &gt; 0; i--)
      {
          nphrase += phrase[i];
      }
      return nphrase;
  }
  </code></pre>
  
  <p>and below is the calling class. </p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;iostream&gt;
  #include "StringUtil.h"
  
  void main() 
  {
      cout &lt;&lt; "Reversed String: " &lt;&lt; StringUtil::Reverse("I like computers!");
  }
  </code></pre>
  
  <p>And when it runs, it shows </p>
  
  <blockquote>
    <p>Error 5   error LNK2019: unresolved external symbol "public: static class std::basic_string,class std::allocator > __cdecl StringUtil::Reverse(class std::basic_string,class std::allocator >)" (?Reverse@StringUtil@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V23@@Z) referenced in function "void __cdecl a10_StringUtil(void)" (?a10_StringUtil@@YAXXZ) H:\Visual Studio 2010\Projects\Object Oriented C++\Object Oriented C++\Object Oriented C++.obj  Object Oriented C++</p>
  </blockquote>
  
  <p>and </p>
  
  <blockquote>
    <p>Error 6   error LNK1120: 1 unresolved externals   H:\Visual Studio 2010\Projects\Object Oriented C++\Debug\Object Oriented C++.exe    1   1   Object Oriented C++</p>
  </blockquote>
  
  <p>I feel like this is a very simple problem, but I'm used to programming in Java. I'm trying to teach myself how to code in c++ currently, hence my problem.</p>