What do you want to save?
Add Code snippet
New code examples
-
C++ 2022-02-02 21:51:57
pointer in cpp details
Every object in C++ has access to its own address through an important pointer called this pointer. The this pointer is an implicit parameter to all member functions. Therefore, inside a member function, this may be used to refer to the invoking object... Add solution -
C++ 2022-01-31 18:27:39
what is -> in c++
/** * @author Charles Salvia (StackOverflow) * * -> is to access a member function or member variable of an object through * a pointer, as opposed to a regular variable or reference. */ // For example: with a regular variable or reference, you us... Add solution -
C++ 2021-11-21 04:08:17
Write a C++ program using class and objects. You have to define multiple-member functions outside class and all those functions will be the same name
#include <iostream> using namespace std; class Box { public: double length; // Length of a box double breadth; // Breadth of a box double height; // Height of a box // Member functions declaration... Add solution -
C++ 2021-10-25 18:01:11
virual function
#include <iostream> using namespace std; class Enemy { public: virtual void Attack() {} }; class Ninja : public Enemy { public: void Attack() { cout << "ninja attack" << endl; } }; class Monster :public Enemy { void ... Add solution -
C++ 2021-10-14 12:41:11
this in c++
Every object in C++ has access to its own address through an important pointer called this pointer. The this pointer is an implicit parameter to all member functions. Therefore, inside a member function, this may be used to refer to the invoking object. ... Add solution -
C++ 2021-10-07 19:31:05
what is this pointer in c++
Every object in C++ has access to its own address through an important pointer called this pointer. The this pointer is an implicit parameter to all member functions. Therefore, inside a member function, this may be used to refer to the invoking object. ... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5