草庐IT

class_initialize

全部标签

c++ - 模块 : AHBot (no matching constructor for initialization of 'WorldSession' )

基本上我遇到了这个错误,没有匹配的构造函数来初始化“WorldSession”WorldSession_session(AHBplayerAccount,NULL,SEC_PLAYER,sWorld->getIntConfig(CONFIG_EXPANSION),0,LOCALE_zhCN,0,false,false);^/home/djboxer/Projects/azerothcore/src/server/game/Server/WorldSession.h:188:9:note:candidateconstructornotviable:requires10arguments,

c++ - SSE 与类(class)保持一致

有一些非常奇怪的问题,作为c++的初学者,我不知道为什么。structDeviceSettings{public:....somevariablesDXSizeBackbufferSize;....somemethods};structDXPoint;typedefDXPointDXSize;__declspec(align(16))structDXPoint{public:union{struct{intx;inty;};struct{intwidth;intheight;};intdataint[2];__m128im;};DXPoint(void);DXPoint(intx,in

c++ - gdb python编程: how to write code that will set breakpoints to every method of a C++ class?

我希望能够在gdb中为C++类的每个方法设置断点。我认为最简单的方法可能是python,因为现在python可以完全访问gdb。我对python知之甚少,而在它上面加上gdb,它就更难了。我想知道是否有人知道如何编写一个类python代码来为gdb中命名类的每个方法设置断点。 最佳答案 假设您使用调试符号进行编译,您甚至不需要python:rbreaksource.cpp:. 关于c++-gdbpython编程:howtowritecodethatwillsetbreakpointsto

c++ - 错误 : ‘Class’ was not declared in this scope

请问,如何在另一个类中定义类。在下面的代码中。我尝试以#define"CCompField.h"的方式定义它,但它不起作用。:(。我认为这是非常常见的编程问题,可能在互联网上已经解决了100000次,但我不知道如何找到它。感谢您的帮助。#ifndefCNEWGAME_H#defineCNEWGAME_HclassCNewGame{public:CNewGame();~CNewGame();voidBeginnerGame();voidIntermediateGame();voidAdviceGame();voidHowToPlay();voidNetGame(intmode);intM

C++ 2011 : good syntax to initialize an array in a constructor?

这里我有一个示例类:templateclassMyClass{public:MyClass();~MyClass();protected:T_data[SIZE];};templateMyClass::MyClass()://_data()OR_data({})OR_data{}OR...{;}在默认构造函数中将整个数组初始化为0的正确C++2011语法是什么?非常感谢。 最佳答案 统一初始化语法运行良好:MyClass():_data{}{} 关于C++2011:goodsyntaxt

c++ - 为什么要在 Py_Initialize() 之前调用 PyImport_AppendInittab()?

根据documentation,PyImport_AppendInittab“应该在Py_Initialize()之前调用。”没有解释为什么会这样,忽略此建议会产生一个有效的应用程序。那么,既然可以,那么在什么情况下会不行呢? 最佳答案 因为文档是这么说的;违反API可能会在今天产生一个可用的应用程序,但明天就不会。您可能会遇到的几个问题:sys.builtin_module_names在Py_Initialize中初始化,因此它不会包含您的模块PyImport_AppendInittab不获取任何锁,因此如果您在多线程应用程序中的

c++ - 为什么我收到错误 : initializing argument 1 of 'Item::Item(int)' [-fpermissive] in Eclipse when I try to compile my C++ code?

我是C++的新手,在盯着它看了太久之后终于放弃了尝试编译它。编译器似乎出于某种原因拒绝了头文件中的构造函数原型(prototype)......我无法弄清楚它有什么问题。项目.h:#ifndefITEM_H_#defineITEM_H_classItem{public:Item(int);//ThislineiswhatEclipsekeepsflaggingupwiththeerrorinthetitlevirtual~Item();Item*getNextPtr();intgetValue();voidsetNextPtr(Item*);};#endif/*ITEM_H_*/在我的

C++ : friends of class and "this" pointer

我有一个小问题要问你:),我知道每个方法都“secret地”获取它们所在的某个类的“this”指针,但为什么“友元”函数不会发生这种情况?是因为它们不是类的方法吗?谁能解释一下整个机器,我对“这个”到底是如何工作的很感兴趣!提前致谢!:) 最佳答案 friend函数和类仅用于编译器检查的访问控制。friend函数只是标准函数,因此调用约定不会有任何差异。friend函数不是任何类的成员,因此没有传递this指针(与static成员函数一样)类的非static成员函数将得到一个隐藏this指针(根据ABI这通常是第一个参数),stat

< input class =“ BTN BTN-DEFAULT BTN-SM用户BTN”>带下划线的文字问题

正如问题所写<button>vs.<输入类型=“button”/>。要使用哪个?我用:"设置:"我这样做是因为我没有通过按钮发送任何内容。问题是我得到了下划线的文本,例如:如何“删除”红线?看答案这就是拼写检查错误,您可以通过添加'spellcheck="false"'输入,即:""

c# - 正在注册的类(class)上获取类(class)未注册 80041054

我正在从非托管代码调用CoCreateInstance到已注册的托管类(存在HKEY_CLASSES_ROOT\CLSID{xxxxx-xxxxxx-xxxxxx-xxxxx-xxxxxx-xxxxx}注册表项,并且该文件已从另一个程序正确加载。代码如下:HRESULThRC;CoInitialize(NULL);char*sUTProgID="My.Utilities";CLSIDUTClassID;hRC=CLSIDFromProgID(_CW(sUTProgID),//PointertotheProgID&UTClassID);//PointertotheCLSIDif(S_OK