ホーム » VC » error C2272

2024年4月
 123456
78910111213
14151617181920
21222324252627
282930  

カテゴリー

アーカイブ

ブログ統計情報

  • 82,110 アクセス


error C2272

次の様なコードで static にしようとすると,

class	RegPatNo	:	public	iDocCSV	{
//	...
public:
/*	static	*/	tstring		GetPathRPC	(void)	const ;
	} ;

inline	tstring	RegPatNo::GetPathRPC	(void)	const
{

	tstring	tmp_path = ::Get_i_Tools_tmp_date() ;
	::Folder_Create(tmp_path) ;
	tstring	rpc_name = ::Path_AddLastSP(tmp_path) + FN_RP_csv ;
	return	rpc_name ;
	}
--------------------Configuration: T_CSV_ - Win32 Debug--------------------
Compiling...
T_CSV_.cpp
t:\develop\_.src\test\regpatno.hpp(101) : error C2272: 'GetPathRPC' : modifiers not allowed on static member functions
Error executing cl.exe.

T_CSV_.exe - 1 error(s), 0 warning(s)

error C2272  : modifiers not allowed on static member functions
次の様に const の指定を外さなければならない.
static tstring GetPathRPC (void) ;
const の指定を外す

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.
%d人のブロガーが「いいね」をつけました。