I'm trying to call my templated function with no success :(
My memaddr.h:
#ifndef __MEM_ADDR_WRITER__
#define __MEM_ADDR_WRITER__
#include <windows.h>
#include <tlhelp32.h>
#include <stdio.h>
namespace MemAddr {
template <typename WRITABLE>
int WriteMemoryAddress(const char* process, unsigned long address, WRITABLE value);
}
#endif
The call:
byte value = 0xEB;
MemAddr::WriteMemoryAddress("jamp.exe", 0x004392D2, value);
Error Message:
undefined reference to `int MemAddr::WriteMemoryAddress<unsigned char>(char const*, unsigned long, unsigned char)`
Answer: Templates needs to be defined in headers.. (@Shaggi)