Answers for "c++ type to string"

C++
7

c++ int to string

#include <string>
using namespace std;

int iIntAsInt = 658;
string sIntAsString = to_string(iIntAsInt);
Posted by: Guest on June-27-2020
0

typeid to string c++

#include <string>
#include <typeinfo>
#include <iostream>

using namespace std;

int main(int argc, char** argv) {
    string str = "string";
    cout << typeid(str).name();
    return 0;
}
Posted by: Guest on May-03-2020

Code answers related to "c++ type to string"

Browse Popular Code Answers by Language