OBJECT DECLARATION

does in c++ there is any perfect definition for the declaration of the class as given into the following example ,yes i know that is the one way from where we can declare the object of the class but does there is any proper definition then send me in reply…

THis code is basically compile with the codeblock

ex


#include
using namespace std;
class H
{
public:
char name[];
void gvalue();
void putvalue();
}h;
void H :: gvalue()
{
cout<<“Enter name”;
cin>>h.name;
}
void H :: putvalue()
{
cout<<h.name;
}
int main()
{
h.gvalue();
h.putvalue();
return 0;
}