gpt4 book ai didi

c++ - VC++ 6.0 中的 Cfitsio 错误

转载 作者:太空宇宙 更新时间:2023-11-04 12:20:18 24 4
gpt4 key购买 nike

我正在连接两个软件,其中一个使用 sfits 库来处理适合的图像,当编译程序时它在 XLOCALE 文件中显示错误,该文件位于 vc98/include 文件夹中,我使用的是 vc 6.0 和 XP,

error : error C2955: 'ctype' : use of class template requires template argument list C:\Program Files\Microsoft Visual Studio6\VC98\INCLUDE\xlocale(513) : see declaration of 'ctype'

error is pointing to line : int fits_get_compression_type(fitsfile *fptr, int *ctype, int *status);

在 XLOCALE 文件中它指向:

template<class _E>
class ctype : public ctype_base {
public:
typedef _E char_type;

ctype(const _Locinfo& _Lobj, size_t _R = 0)
: ctype_base(_R) {_Init(_Lobj); }
static size_t __cdecl _Getcat()
{return (_LC_CTYPE); }
_PROTECTED:
virtual ~ctype()
{if (_Ctype._Delfl)
free((void *)_Ctype._Table); }
protected:


virtual const _E *do_narrow(const _E *_F, const _E *_L,
char, char *_V) const
{for (; _F != _L; ++_F, ++_V)
*_V = (char)_NARROW(_E, *_F);
return (_F); }
private:
_Locinfo::_Ctypevec _Ctype;
};
template<class _E>
locale::id ctype<_E>::id;

提前致谢...

最佳答案

ctype 是类型的模板,而不是类型本身。您的参数必须是 ctype<char>ctype<wchar_t>取决于您使用的字符类型。

关于c++ - VC++ 6.0 中的 Cfitsio 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5448993/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com