what is the difference between class and structure in C++?
Answer Posted / vijayendra singh chand
The main difference between class and structure is that
class is reference type whereas structure is value type.
| Is This Answer Correct ? | 5 Yes | 4 No |
Post New Answer View All Answers
What is pointer in oop?
What is polymorphism in oops with example?
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
What is polymorphism oop?
What is polymorphism and why is it important?
Is this job good for future? can do this job post grduate student?
What is overriding vs overloading?
What is interface in oop?
What does and I oop mean in text?
What is object in oop?
What are the important components of cohesion?
Is oop better than procedural?
Will I be able to get a picture in D drive to the c++ program? If so, help me out?
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer