incomplete-type

    6热度

    1回答

    我有stat.h 一个很奇怪的问题,在我的代码上无法定义,我声明: #include <sys\types.h> #include <sys\stat.h> 而且函数原型: int FileSize(string szFileName); 最后,本身被定义为函数如下: int FileSize(string szFileName) { struct stat fileStat

    16热度

    2回答

    正在声明一个类型的静态字段,该类型在C++中的合法类定义时是不完整的?例如: 了foo.h: class Foo { public: // ... private: class Bar; static Bar something; }; Foo.cpp中: class Foo::Bar { // ... }; Foo::Bar Foo::

    2热度

    2回答

    可能重复: What leads to incomplete types? (QGraphicsItem: Source or target has incomplete type) 我开始了这个问题:What leads to incomplete types? (QGraphicsItem: Source or target has incomplete type) 由于没有提到,我得到了以下

    0热度

    1回答

    我想改用我的代码使用make_shared<type>(),但我有很多不完整的类型(完全在创建时间),想知道是否有无论如何make_shared将不完整的工种或者允许我传递删除类型。 我环顾四周,并没有发现与此相关的所以要么这只是工作的任何信息?或者我忽略了一些基本的东西。 #define NEW_PARAMS(Type, ...) ::std::shared_ptr<Type>(new (Typ

    2热度

    1回答

    我得到以下错误警告: Passing 'MyCLController *__strong' to parameter of incompatible type 'id<CLLocationManagerDelegate>' ...在这条线: self.locationManager.delegate = self; 如果我删除整个位置更新过程失败行。所以它是导入,但也包括一个错误。 位置更

    16热度

    2回答

    有时它来实例化一个标准集装箱用一个不完整的类型得到递归结构是有益的: struct multi_tree_node { // Does work in most implementations std::vector<multi_tree_node> child; }; struct trie_node { // Does not work in most implementati

    0热度

    1回答

    如果得到一个很简单的问题(至少我希望如此),但我不知道该怎么做才能告诉g ++以什么顺序“完成”我的类。我它降低到这个简单的例子: base.h: #ifndef BASE_H_ #define BASE_H_ #include "otherclass.h" class otherclass; class base { public: base(otherclas

    1热度

    2回答

    我不知道为什么我得到这个错误......“错误:字段'配置'具有不完整的类型”。我试图做向前声明和包括使用的#include ...我只是想包括fConfig在fInstance头... #ifndef FINSTANCE_H #define FINSTANCE_H //#include "fConfig.h" #include <vector> #include <sys/types.

    0热度

    1回答

    空隙parse_message(字符*缓冲液,INT LEN) { struct iphrd *ip_header = (struct iphrd *)buffer; int recv_hopcount = (unsigned int)(ip_header->ttl); //hops[recv_hopcount]++; } 错误:解引用指针不完全型 我有在头文件中包含netinet/i

    1热度

    2回答

    我在C++的分配,我并不特别精通语言工作 我试图宣布“帐户”的对象的动态阵列中的一文件主。的.cpp: Account * acctArray = new Account[]; main.cpp中包括Account.h: class Account { private: int customerID; int BSB; int acctNumber;