What is "clear"?
Your program is not a C program. It is C++. I think it is better that this post would moved to C++ section.
Inside a class or structure (both are almost same thing in C++) you can not set member values because they are not still created.