C++/Creating a C Class and incorporating it into a program
Expert: Eddie - 8/13/2006
QuestionHello, 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
AnswerHello 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