cneterror.cpp

来自「<B>DirectX9.0 3D游戏编程</B>」· C++ 代码 · 共 43 行

CPP
43
字号
/*******************************************************************
 *         Advanced 3D Game Programming using DirectX 9.0
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * copyright (c) 2003 by Peter A Walsh and Adrian Perez
 * See license.txt for modification and distribution information
 ******************************************************************/
// cNetError.cpp: implementation of the cNetError class.
//
//////////////////////////////////////////////////////////////////////

#include "cNetError.h"
#include <string.h>
#define WINDOWS_LEAN_AND_MEAN
#include <windows.h>  // OutputDebugString()

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

cNetError::cNetError()
{
  d_text[ 0 ] = NULL;
}


cNetError::~cNetError()
{
}


cNetError::cNetError( const char *pText )
{
  if( pText == NULL )
    strcpy( d_text, "Unspecified." );
  else
    strcpy( d_text, pText );

  OutputDebugString( "Network Error: " );
  OutputDebugString( d_text );
  OutputDebugString( "\n" );
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?