ホーム » VC » error C2062 , C2065

2023年12月
 12
3456789
10111213141516
17181920212223
24252627282930
31  

カテゴリー

アーカイブ

ブログ統計情報

  • 80,618 アクセス



error C2062 , C2065

先日作成した,レジストリなどのアクセスのコード
それを使用しているコードを VC 2015 環境でビルドすると…

1>------ ビルド開始: プロジェクト:S_asZ, 構成:Debug Win32 ------
1>t:\develop\_.src\__win\ri_env.hxx(67): error C2062: 型 'bool' は不要です。
1>t:\develop\_.src\__win\ri_env.hxx(69): error C2065: 'res': 定義されていない識別子です。
1>t:\develop\_.src\__win\ri_env.hxx(70): error C2065: 'res': 定義されていない識別子です。
1>t:\develop\_.src\__win\ri_env.hxx(72): error C2065: 'res': 定義されていない識別子です。
1>t:\develop\_.src\__win\ri_env.hxx(78): error C2062: 型 'bool' は不要です。
1>t:\develop\_.src\__win\ri_env.hxx(80): error C2065: 'res': 定義されていない識別子です。
1>t:\develop\_.src\__win\ri_env.hxx(81): error C2065: 'res': 定義されていない識別子です。
1>t:\develop\_.src\__win\ri_env.hxx(83): error C2065: 'res': 定義されていない識別子です。
1>t:\develop\_.src\__win\ri_env.hxx(133): error C2062: 型 'bool' は不要です。
1>t:\develop\_.src\__win\ri_env.hxx(135): error C2065: 'res': 定義されていない識別子です。
1>t:\develop\_.src\__win\ri_env.hxx(136): error C2065: 'res': 定義されていない識別子です。
1>t:\develop\_.src\__win\ri_env.hxx(138): error C2065: 'res': 定義されていない識別子です。
========== ビルド: 0 正常終了、1 失敗、0 更新不要、0 スキップ ==========

error C2062: 型 'bool' は不要です。
今まで OpenMP が動作しない状態でのビルドだったので気づかなかった.
#ifdef _OPENMP … #endif の位置が違っていた.

bool	set_DW	(LPCTSTR sec,LPCTSTR ent,const u_32 val)    {
    bool	res = false ;
    #ifdef	_OPENMP
        #pragma	omp	critical	(RI_app_set_DW)
    #endif
    {
        if (Use_reg)	{    REG_get_sec_key(sec) ;	res = RI_rkey.set_DW(         ent,val) ;    }
        else       	{                          	res = ::  INI_set(NameINI,sec,ent,val) ;    }
        }
    return	res ;
    }

bool res = false を #ifdef の前に持ってきて対応.

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