What do you want to save?
Add Code snippet
New code examples in category C++
-
-
Hamed Ghaderi 2021-09-01 06:33:02
C++ how to save data about a object
#include <fstream> #include <iostream> class Something { public: int weight; int size; // Insertion operator friend std::ostream& operator<<(std::ostream& os, const Something& s) { // write out individual members of ... Add solution -
Hultqvist 2021-09-01 05:05:01
c++ require keyword
#include <string> #include <cstddef> #include <concepts> // Declaration of the concept "Hashable", which is satisfied by any type 'T' // such that for values 'a' of type 'T', the expression std::hash<T>{}(a) // com... Add solution -
S.Jennings 2021-09-01 03:03:02
glut keyboard input
void keyboard(unsigned char key, int x, int y) { Add solution -
Mr. TA 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 -
Guilherme Castro 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
Best helpers
Skout
+5
Chd
+5
Mark Walsh
+5
Dasedes
+5
JCM
+5
Lim
+5
TheBeege
+5
Bryce Wagner
+5
Sg qy
+5
NullPointer
+5