Procedure and objectoriented programming C++