1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
//////////.h
#pragma once
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <string>
#define PRINTF_DEBUG_S(string_data)\
printfDebugMac(__FILE__, __LINE__, "%s", string_data);
void printfDebugMac(const char* file, int line, const char* format, ...);
void printfDebug(const char* format, ...);
//////////.cpp
#include "Utilities.h"
void printfDebugMac(const char* file, int line, const char* format, ...)
{
#if defined(DEBUG_PRINT) || defined(DEBUG)
//char* file_correct = strrchar(file, "/");
int poop = std::string(file).find_last_of("/");
char buffer[2056];
va_list al;
va_start(al, format);
vsprintf(buffer, format, al);
va_end(al);
#endif
}
void printfDebug(const char* format, ...)
{
#if defined(DEBUG_PRINT) || defined(DEBUG)
va_list al;
va_start(al, format);
vprintf(format,al);
va_end{al);
#endif
}
|