You are here:

C++/Creating a C Class and incorporating it into a program


Hello, I have a problem and unforunately I need the answer to the problem very soon. I thought I would have figured this out by now, but I haven't had any luck.

First - some background information. I am very new to the object oriented programming in C++. My problem is that I need to create a program that will calculate the area of a rectangular room. I must create a C++ class and put the code in the method of that class rather than in main.

I can write a complete C++ program that works fine, but when it comes to creating and defining a class, I am so lost. How should I go about creating this class? Once the class is created, how should it be defined. I am not understanding what elements I need to make up this class and how to incorporate it into my C++ program. I am using Visual Studio 2005, and I think i'm over complicating it and that's why I am sooo lost - please help.

My deadline is tomorrow at 10pm MST

Hello Bluemajic, thank you for the question.

I think you are overthinking the problem. Are you having fundamental or syntactical problems with defining a class? Do you not know what to store in the class? Or do you not know how to create one in code?

- Eddie


All Answers

Answers by Expert:

Ask Experts




I can answer questions about the C++ language, object oriented design and architecture. I am knowledgable in a lot of the math that goes into programming, and am certified by I also know a good deal about graphics via OpenGL, and GUIs.


I have completed numerous games and demos created with the C++ programming language. Currently employed as a software engineer in the modeling and simulation field. I have about 7 years experience.

©2017 All rights reserved.

[an error occurred while processing this directive]