What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-01 04:52:02
remove from set javascript
// erasing from set #include <iostream> #include <set> int main () { std::set<int> myset; std::set<int>::iterator it; // insert some values: for (int i=1; i<10; i++) myset.insert(i*10); // 10 20 30 40 50 60 70 80 90 ... Add solution -
C++ 2021-09-01 02:28:02
char * to string c++
// "std::string" has a method called "c_str()" that returns a "const char*" // pointer to its inner memory. You can copy that "const char*" to a variable // using "strcpy()". std::string str = "Hello... Add solution -
C++ 2021-09-01 00:45:03
c++ dynamic memory allocation exercises
#include <iostream> using namespace std; int main () { double* pvalue = NULL; // Pointer initialized with null pvalue = new double; // Request memory for the variable *pvalue = 29494.99; // Store value at allocated address cou... Add solution -
C++ 2021-08-31 18:20:01
passing the value to base class constructor from derived class c++
#include <iostream> #include<string> using namespace std; class Father{ protected: int height; public: Father(){ cout << "constructor of father is called"<<endl; } }; class Mother{ protected: strin... Add solution