how i will find type of variable from void *. cout return Pv on gcc-4.4.5 but i get original type on each iterator such as int, double etc. according iterartion
#include <stdio.h>
#include <vector>
#include<iostream>
#include <typeinfo>
#include<string>
using namespace std;
class Myclass{
public:
int ab;
};
int main(void) {
vector<void *> vec;
float k = 2.2;
int i = 100;
double d = 5;
Myclass myclass;
myclass.ab = 5;
vec.push_back(&i);
vec.push_back(&k);
vec.push_back(&d);
vec.push_back(&myclass);