ホーム » 2020 » 1月 » 22

日別アーカイブ: 2020/01/22

2020年1月
 1234
567891011
12131415161718
19202122232425
262728293031  

カテゴリー

アーカイブ

ブログ統計情報

  • 77,344 アクセス



VC 6 C2059 C2091 C2809 C2954

2001/11 作成のプロジェクトをビルドしたらよくわからないエラー.

--------------------構成: MsgStCon - Win32 Debug--------------------
コンパイル中...
MsgStCon.cpp
c:\program files\microsoft visual studio\vc98\include\memory(16) : error C2059: 構文エラー : 'string'
c:\program files\microsoft visual studio\vc98\include\memory(17) : error C2091: 関数は関数を返せません。
c:\program files\microsoft visual studio\vc98\include\memory(17) : error C2809: 'operator new' に仮引数リストがありません。
c:\program files\microsoft visual studio\vc98\include\memory(20) : error C2954: テンプレートの定義はネストできません。
cl.exe の実行エラー

MsgStCon.obj - エラー 4、警告 0

C2059 C2091 C2809 C2954


ソースの先頭付近に #include <memory> を追加.

#include	"StdAfx.h"
#include	"MsgStCon.h"

#include	<memory>	//	① OK
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#include	<memory>	//	② NG

//	...

②の位置では現象は変わらず.①の位置に追加する必要がある.


2023/03/24
error C2061 , C2091 , C2809 , C2556

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.