Exact Message:

Error	1	error C3861: 'SHOWERROR': identifier not found

My Includes:

#pragma once

// Exclude rarely-used stuff from Windows headers 
#define WIN32_LEAN_AND_MEAN

#define SAFE_RELEASE(x) if( x ) { (x)->Release(); (x) = NULL; } 
#define SAFE_DELETE(x) if( x ) { delete(x); (x) = NULL; } 
#define SAFE_DELETE_ARRAY(x) if( x ) { delete [] (x); (x) = NULL; }

// Windows Header Files: 
#include <windows.h>
#include <WindowsX.h>
// C/C++ RunTime Header Files 
#include <cstdio> 
#include <cstdlib> 
#include <malloc.h> 
#include <memory.h> 
#include <tchar.h>
#include <iostream>
#include <cassert>

// DirectX Header Files 
#include <d3d9.h>

Now, I've used SHOWERROR before. I just seem to have...misplaced it. Googling is useless as it keeps trying to put a space or underscore between show and error yielding no results that I'm looking for.

Any hint to throw me in the right direction would be fantastic. I have a feeling that it's incredibly obvious but I can't for the life of me figure out where it's defined.

I don't see SHOWERROR anywhere in the code you posted.

SAFE_DELETE is not really needed because delete and delete[] work correctly when the pointer is a NULL pointer. So there is no need for those two macros.

I don't see SHOWERROR anywhere in the code you posted.

SAFE_DELETE is not really needed because delete and delete[] work correctly when the pointer is a NULL pointer. So there is no need for those two macros.

Indeed, I perfectly understand the unnecessary macros for deletion but this is an old header file I use for all my DirectX projects and I didn't really think it was worth taking them out just in case I needed to compile some old code with it in.

As for SHOWERROR I thought it was a Windows macro like "FAILED" and "SUCCEEDED" are. Which is why I was confused having used it before but can't now.

It should throw up an assert box with the file and line number of the error, I've also seen it in code posted on the web, so I thought it was something global. However, if you don't know then I guess it isn't :)

Found it! :) #define SHOWERROR(s,f,l) char buf[1024]; sprintf( buf, "File: %s\nLine: %d\n%s",f,l,s); MessageBox( 0, buf, "Error", 0 );

This question has already been answered. Start a new discussion instead.