title: My code is username validation, user must be enter the word capital
body: <pre><code>#include&lt;iostream&gt;
  #include&lt;conio.h&gt;
  #include&lt;string.h&gt;
  #include&lt;cctype&gt;
  
  using namespace std;
  string::size_type len;
  
  class login{
  private:
      char  name[10];
      string password;
  
  public:
      login()
      {
          strcpy(name,"0");
          password="0";
      }
      void user()
      {
          cout&lt;&lt;"enter the user name::";
          cin&gt;&gt;name;
      }
  
      char user_varification()
      {
          user();                    
          for(int i=1;i&lt;=name.length();i++){                      
              if(isupper(name[i]))
                  cout&lt;&lt;name[i];
          }
      }                                               
  };
  
  int main()
  {
      //cout&lt;&lt;"user name should be is capitallater"&lt;&lt;endl&lt;&lt;"length must be minimum 6 characher and user name "&lt;&lt;endl;//
      login s;
      s.user_varification();
      system ("pause");
  }
  </code></pre>
  
  <p>Error message</p>
  
  <pre><code>29  C:\Users\Adeel Haider\Desktop\hellow.cpp
  [Error] request for member 'length' in '((login*)this)-&gt;login::name', which is of non-class type 'char [10]'    
  </code></pre>