Search
 
SCRIPT & CODE EXAMPLE
 

CPP

pointer address to string

#include <sstream> //for std::stringstream 
#include <string>  //for std::string

const void * address = static_cast<const void*>(this);
std::stringstream ss;
ss << address;  
std::string name = ss.str();
Comment

PREVIOUS NEXT
Code Example
Cpp :: how to find the sum of a vector c++ 
Cpp :: string to uint64_t c++ 
Cpp :: are strings mutable in c++ 
Cpp :: c++ keyboard input 
Cpp :: how to declare a 2d boolean vector in c++ 
Cpp :: int max c++ 
Cpp :: c++ output 
Cpp :: concat two vectors c++ 
Cpp :: iterate over vector in c++ 
Cpp :: how to input a vector when size is unknown 
Cpp :: overload of << c++ 
Cpp :: How to write into files in C++ 
Cpp :: inline function in c++ 
Cpp :: anagram solution in c++ 
Cpp :: find kth max and min element in an array 
Cpp :: string vector to string c++ 
Cpp :: sort array c++ 
Cpp :: C++ float and double Different Precisions For Different Variables 
Cpp :: doubly linked list in cpp 
Cpp :: how can we create 4 digit random number in c++ 
Cpp :: how to use custom array in c++ 
Cpp :: c++ clip values 
Cpp :: c++ elif 
Cpp :: vector of vectors of pairs c++ 
Cpp :: Subarray with given sum in c++ 
Cpp :: is anagram c++ 
Cpp :: standard template library in c++ 
Cpp :: find positive number factorial in C++ 
Cpp :: create new node in tree 
Cpp :: min heap stl 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =