Check out example codes for "typeid to string c++". It will help you in understanding the concepts better.

Code Example 1

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

using namespace std;

int main(int argc, char** argv) {
    string str = "string";
    cout << typeid(str).name();
    return 0;
}

Learn ReactJs, React Native from akashmittal.com