草庐IT

event_name

全部标签

c++ - 多重继承 : same variable name

classA{protected:stringword;};classB{protected:stringword;};classDerived:publicA,publicB{};在Derived中变量word的可访问性会受到怎样的影响?我该如何解决? 最佳答案 这将是模棱两可的,你会得到一个编译错误。您需要使用正确的范围来使用它:classDerived:publicA,publicB{Derived(){A::word="A!";B::word="B!!";}}; 关于c++-多重

c++ - 多重继承 : same variable name

classA{protected:stringword;};classB{protected:stringword;};classDerived:publicA,publicB{};在Derived中变量word的可访问性会受到怎样的影响?我该如何解决? 最佳答案 这将是模棱两可的,你会得到一个编译错误。您需要使用正确的范围来使用它:classDerived:publicA,publicB{Derived(){A::word="A!";B::word="B!!";}}; 关于c++-多重

c++ - 错误 : incomplete type used in nested name specifier

有2个非模板类A,B有一些静态模板方法。从类A调用B中的静态方法,并从类B调用A中的静态方法.源代码仅供说明(非真实代码)...啊.h#include"B.h"classA{public:templatevoidf1(){Tvar1=...;Tvar2=B::f4(T);}templateTf2(){return...}};#include"A.h"classB{public:templatevoidf3(){Tvar1=...;Tvar2=A::f2(T);//Error}templateTf4(){return...}};我在使用NetBeans中的g++编译器时遇到问题。在编译过

c++ - 错误 : incomplete type used in nested name specifier

有2个非模板类A,B有一些静态模板方法。从类A调用B中的静态方法,并从类B调用A中的静态方法.源代码仅供说明(非真实代码)...啊.h#include"B.h"classA{public:templatevoidf1(){Tvar1=...;Tvar2=B::f4(T);}templateTf2(){return...}};#include"A.h"classB{public:templatevoidf3(){Tvar1=...;Tvar2=A::f2(T);//Error}templateTf4(){return...}};我在使用NetBeans中的g++编译器时遇到问题。在编译过

c# - "Unable to find an entry point named [function] in dll"(c++到c#类型转换)

我有一个来自第三方的dll,它是用C++编写的。以下是来自dll文档的一些信息://startdocumentationRECO_DATA{wchar_tSurname[200];wchar_tFirstname[200];}说明:接收函数结果的数据结构。所有函数结果将是存储为Unicode(UTF-8)。方法:boolrecoCHN_P_Name(char*imgPath,RECO_DATA*o_data);输入:char*imgPath此图像位置的完整路径识别功能RECO_DATA*o_data接收函数的数据对象结果。函数返回:成功则返回true,否则返回false。//enddo

c# - "Unable to find an entry point named [function] in dll"(c++到c#类型转换)

我有一个来自第三方的dll,它是用C++编写的。以下是来自dll文档的一些信息://startdocumentationRECO_DATA{wchar_tSurname[200];wchar_tFirstname[200];}说明:接收函数结果的数据结构。所有函数结果将是存储为Unicode(UTF-8)。方法:boolrecoCHN_P_Name(char*imgPath,RECO_DATA*o_data);输入:char*imgPath此图像位置的完整路径识别功能RECO_DATA*o_data接收函数的数据对象结果。函数返回:成功则返回true,否则返回false。//enddo

c++ - 中缀 vs 前缀语法 : name lookup differences

C++中的运算符通常被认为是函数/方法的替代语法,尤其是在重载的上下文中。如果是这样,下面的两个表达式应该是同义词:std::cout在实践中,第二条语句会导致以下错误:callofoverloaded‘operator像往常一样,这样的错误信息伴随着一个可能的候选列表,它们是:operator&__out,char__c)operator&__out,char__c)operator&__out,signedchar__c)operator&__out,unsignedchar__c)这样的错误至少引发了两个问题:这两个语句有何不同(在名称查找方面)?为什么operator&__ou

c++ - 中缀 vs 前缀语法 : name lookup differences

C++中的运算符通常被认为是函数/方法的替代语法,尤其是在重载的上下文中。如果是这样,下面的两个表达式应该是同义词:std::cout在实践中,第二条语句会导致以下错误:callofoverloaded‘operator像往常一样,这样的错误信息伴随着一个可能的候选列表,它们是:operator&__out,char__c)operator&__out,char__c)operator&__out,signedchar__c)operator&__out,unsignedchar__c)这样的错误至少引发了两个问题:这两个语句有何不同(在名称查找方面)?为什么operator&__ou

c++ - C++ 标准中短语 "constructors do not have names"的含义

在尝试理解C++标准中的“构造函数没有名称”这一短语时,我似乎在clang中发现了一个错误。有人可以证实这一点吗?VS2015andgcc拒绝此代码,我认为他们它是是正确的。至少,这是我从N4140中的§12.1[class.ctor]/2得到的印象:#includeclassA{public:A(){std::cout§12.1[class.ctor]/2在N4140中:Aconstructorisusedtoinitializeobjectsofitsclasstype.Becauseconstructorsdonothavenames,theyareneverfounddurin

c++ - C++ 标准中短语 "constructors do not have names"的含义

在尝试理解C++标准中的“构造函数没有名称”这一短语时,我似乎在clang中发现了一个错误。有人可以证实这一点吗?VS2015andgcc拒绝此代码,我认为他们它是是正确的。至少,这是我从N4140中的§12.1[class.ctor]/2得到的印象:#includeclassA{public:A(){std::cout§12.1[class.ctor]/2在N4140中:Aconstructorisusedtoinitializeobjectsofitsclasstype.Becauseconstructorsdonothavenames,theyareneverfounddurin