title: Where did i go wrong c++ classes
body: <p>Hi this is my first subject (question) at stack overflow i've tried an project about c++ classes at Code::Blocks but something went wrong</p>
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  class char1
  {
      public:
      string charName;
      float charLength;
  
      void printName()
      {
          cout&lt;&lt;&quot;char name is&quot;&lt;&lt;charName;
      }
  };
  
  int main()
  {
      int charNAME;
      float charLENGTH;
  
      cout&lt;&lt;&quot;write your char's name&quot;&lt;&lt;endl;
      cin&gt;&gt;charNAME;
  
      cout&lt;&lt;&quot;write your char's length&quot;&lt;&lt;endl;
      cin&gt;&gt;charLENGTH;
  
      char1 name;
      char1 length;
  
      name.charName=charNAME;
      length.charLength=charLENGTH;
  
      return 0;
  }
  </code></pre>
  <p>when i run program it asks me char's name i write something, after it asks char's length
  but program end there i cant do anything
  <a href="https://i.stack.imgur.com/4k7CG.png" rel="nofollow noreferrer">here is picture for help</a></p>