What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-09-17 01:21:01
create a dictionary cpp
// The equivalent to python dictionaries are maps in c++ map<int, char> mymap; // Enter required types and name mymap[1] = 'a'; mymap[4] = 'b'; cout << "my map is -" << mymap[1] << " " < <mymap[4... Add solution -
Other 2021-09-16 21:56:01
inheritance in oops
#include <iostream> // Example in a game we have multiple entities so we put commom functionality and variables in base class Entity and Create Sub Classes Of the base class class Entity { //This is a base class of all entities public: float x =0... Add solution -
Other 2021-09-16 14:33:02
#include <bits/stdc++.h> use
#include <bits/stdc++.h> using namespace std; //Base class class Parent { public: int id_p; }; // Sub class inheriting from Base Class(Parent) class Child : public Parent { public: int id_c; }; //main function int main() ... Add solution