Click here to Skip to main content
15,885,366 members
Articles / Desktop Programming / WTL

C++ Header Guard

Rate me:
Please Sign up or sign in to vote.
3.83/5 (9 votes)
17 Mar 2009CPOL2 min read 51.3K   238   12  
Create unique preprocessor macros to prevent multiple header inclusion.
#ifndef _D23CB4C9BD14475fB5AE2F1EC54251EE_
#define _D23CB4C9BD14475fB5AE2F1EC54251EE_
#pragma once
#ifndef _UNICODE
	#error C_SplitPath is UNICODE-only class
#endif
#include <math.h>

class C_SplitPath				//path composing fcs???
{
public:
    C_SplitPath(LPCTSTR lpszPath = NULL);

    BOOL Split(LPCTSTR lpszPath );

	CString filetitle,fullpath, drive, dir, filename, ext, ext_nodot;

	errno_t SplPstatus;

private:
	void SplitPathInitialize();
    TCHAR drive0[_MAX_DRIVE];
    TCHAR dir0[_MAX_DIR];
    TCHAR fname0[_MAX_FNAME];
    TCHAR ext0[_MAX_EXT];
};
#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Croatia Croatia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions