Is there any way I can get the type of a pointer to a struct?
If it's from a void*, no. Otherwise, you can use RTTI gg