#include <Windows.h>
#include <iostream>
template<class T,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8>
int Call(int addr,T p0,T1 p1, T2 p2,T3 p3,T4 p4,T5 p5,T6 p6,T7 p7,T8 p
{
for(int i = 0; i < 9; i++)
{
switch (i)
{
case 0:
if(typeid(T) == typeid(int))
{
std::cout<<"int\n";
}
else if(typeid(T) == typeid(char))
{
std::cout<<"char\n";
}
else if(typeid(T) == typeid(char*))
{
std::cout<<"string\n";
}
else if(typeid(T) == typeid(float))
{
std::cout<<"float\n";
}
break;
case 1:
if(typeid(T1) == typeid(int))
{
std::cout<<"int\n";
}
else if(typeid(T1) == typeid(char))
{
std::cout<<"char\n";
}
else if(typeid(T1) == typeid(char*))
{
std::cout<<"string\n";
}
else if(typeid(T1) == typeid(float))
{
std::cout<<"float\n";
}
break;
case 2:
if(typeid(T2) == typeid(int))
{
std::cout<<"int\n";
}
else if(typeid(T2) == typeid(char))
{
std::cout<<"char\n";
}
else if(typeid(T2) == typeid(char*))
{
std::cout<<"string\n";
}
else if(typeid(T2) == typeid(float))
{
std::cout<<"float\n";
}
break;
case 3:
if(typeid(T3) == typeid(int))
{
std::cout<<"int\n";
}
else if(typeid(T3) == typeid(char))
{
std::cout<<"char\n";
}
else if(typeid(T3) == typeid(char*))
{
std::cout<<"string\n";
}
else if(typeid(T3) == typeid(float))
{
std::cout<<"float\n";
}
break;
case 4:
if(typeid(T4) == typeid(int))
{
std::cout<<"int\n";
}
else if(typeid(T4) == typeid(char))
{
std::cout<<"char\n";
}
else if(typeid(T4) == typeid(char*))
{
std::cout<<"string\n";
}
else if(typeid(T4) == typeid(float))
{
std::cout<<"float\n";
}
break;
case 5:
if(typeid(T5) == typeid(int))
{
std::cout<<"int\n";
}
else if(typeid(T5) == typeid(char))
{
std::cout<<"char\n";
}
else if(typeid(T5) == typeid(char*))
{
std::cout<<"string\n";
}
else if(typeid(T5) == typeid(float))
{
std::cout<<"float\n";
}
break;
case 6:
if(typeid(T6) == typeid(int))
{
std::cout<<"int\n";
}
else if(typeid(T6) == typeid(char))
{
std::cout<<"char\n";
}
else if(typeid(T6) == typeid(char*))
{
std::cout<<"string\n";
}
else if(typeid(T6) == typeid(float))
{
std::cout<<"float\n";
}
break;
case 7:
if(typeid(T7) == typeid(int))
{
std::cout<<"int\n";
}
else if(typeid(T7) == typeid(char))
{
std::cout<<"char\n";
}
else if(typeid(T7) == typeid(char*))
{
std::cout<<"string\n";
}
else if(typeid(T7) == typeid(float))
{
std::cout<<"float\n";
}
break;
case 8:
if(typeid(T == typeid(int))
{
std::cout<<"int\n";
}
else if(typeid(T == typeid(char))
{
std::cout<<"char\n";
}
else if(typeid(T == typeid(char*))
{
std::cout<<"string\n";
}
else if(typeid(T == typeid(float))
{
std::cout<<"float\n";
}
break;
default:
std::cout<<"invalid...\n";
break;
}
}
//get the return value here
system("pause");//just for debug purposes
return 0;
}
Call<char,int,int,int,int,int,int,int,int>(0x0000,'A',0,0,0,0,0,0,0,0);
Call(0x0000,"lol",8f,(int)9.3,0,0,0,0,0,0);
#include <Windows.h>
#include <iostream>
template<class T,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8>
int Call(int addr,T p0,T1 p1, T2 p2,T3 p3,T4 p4,T5 p5,T6 p6,T7 p7,T8 p
{
for(int i = 0; i < 9; i++)
{
switch (i)
{
case 0:
if(typeid(T) == typeid(int))
{
std::cout<<"int\n";
}
else if(typeid(T) == typeid(char))
{
std::cout<<"char\n";
}
else if(typeid(T) == typeid(char*))
{
std::cout<<"string\n";
}
else if(typeid(T) == typeid(float))
{
std::cout<<"float\n";
}
break;
case 1:
if(typeid(T1) == typeid(int))
{
std::cout<<"int\n";
}
else if(typeid(T1) == typeid(char))
{
std::cout<<"char\n";
}
else if(typeid(T1) == typeid(char*))
{
std::cout<<"string\n";
}
else if(typeid(T1) == typeid(float))
{
std::cout<<"float\n";
}
break;
case 2:
if(typeid(T2) == typeid(int))
{
std::cout<<"int\n";
}
else if(typeid(T2) == typeid(char))
{
std::cout<<"char\n";
}
else if(typeid(T2) == typeid(char*))
{
std::cout<<"string\n";
}
else if(typeid(T2) == typeid(float))
{
std::cout<<"float\n";
}
break;
case 3:
if(typeid(T3) == typeid(int))
{
std::cout<<"int\n";
}
else if(typeid(T3) == typeid(char))
{
std::cout<<"char\n";
}
else if(typeid(T3) == typeid(char*))
{
std::cout<<"string\n";
}
else if(typeid(T3) == typeid(float))
{
std::cout<<"float\n";
}
break;
case 4:
if(typeid(T4) == typeid(int))
{
std::cout<<"int\n";
}
else if(typeid(T4) == typeid(char))
{
std::cout<<"char\n";
}
else if(typeid(T4) == typeid(char*))
{
std::cout<<"string\n";
}
else if(typeid(T4) == typeid(float))
{
std::cout<<"float\n";
}
break;
case 5:
if(typeid(T5) == typeid(int))
{
std::cout<<"int\n";
}
else if(typeid(T5) == typeid(char))
{
std::cout<<"char\n";
}
else if(typeid(T5) == typeid(char*))
{
std::cout<<"string\n";
}
else if(typeid(T5) == typeid(float))
{
std::cout<<"float\n";
}
break;
case 6:
if(typeid(T6) == typeid(int))
{
std::cout<<"int\n";
}
else if(typeid(T6) == typeid(char))
{
std::cout<<"char\n";
}
else if(typeid(T6) == typeid(char*))
{
std::cout<<"string\n";
}
else if(typeid(T6) == typeid(float))
{
std::cout<<"float\n";
}
break;
case 7:
if(typeid(T7) == typeid(int))
{
std::cout<<"int\n";
}
else if(typeid(T7) == typeid(char))
{
std::cout<<"char\n";
}
else if(typeid(T7) == typeid(char*))
{
std::cout<<"string\n";
}
else if(typeid(T7) == typeid(float))
{
std::cout<<"float\n";
}
break;
case 8:
if(typeid(T == typeid(int))
{
std::cout<<"int\n";
}
else if(typeid(T == typeid(char))
{
std::cout<<"char\n";
}
else if(typeid(T == typeid(char*))
{
std::cout<<"string\n";
}
else if(typeid(T == typeid(float))
{
std::cout<<"float\n";
}
break;
default:
std::cout<<"invalid...\n";
break;
}
}
//get the return value here
system("pause");//just for debug purposes
return 0;
}
Call<char,int,int,int,int,int,int,int,int>(0x0000,'A',0,0,0,0,0,0,0,0);
Call(0x0000,"lol",8f,(int)9.3,0,0,0,0,0,0);
Copyright © 2024, NextGenUpdate.
All Rights Reserved.