腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
4
回答
类
中
的
Typedef
c++
、
typedef
我如何在一个函数
中
定义类型?让我们考虑一下
类
B有一个int x数据成员。当我尝试编译以下代码时,我得到: expected before‘.’令牌{ { }
浏览 6
提问于2013-03-06
得票数 1
回答已采纳
1
回答
类
中
的
Typedef
c++
有这样
的
代码:class SomeClass{
typedef
std::vector<sPtr> c;};main.cpp:23: error: type ‘std:shared_ptr<X> > >
浏览 2
提问于2011-10-11
得票数 4
回答已采纳
2
回答
类
中
的
Typedef
函数
c++
、
function
、
class
、
typedef
、
stdcall
我希望能够在一个
类
中
拥有我
的
typedef
函数。但是我找不到这样做
的
方法。因为我需要像这样设置地址SetCursorPosFunction = (_SetCursorPos)(address to function);class Cursorpublic: _SetCursorPos SetCursorPosFunction;我希望能够像这样调用Cursor::SetCursorPosFunction(x,y)函数
浏览 13
提问于2018-08-18
得票数 3
回答已采纳
1
回答
模板
类
中
的
typedef
语句
c++
我正在尝试将我
的
一个文件转换成一个模板,但是the语句给我带来了一些麻烦。我得到
的
错误是:在这种情况下,我不太清楚如何使用ty胡枝子,因为如果我“undefined”文件,它认为value_type未定义为该文件
中
引用
的
其
浏览 0
提问于2018-10-17
得票数 1
回答已采纳
1
回答
类
模板
中
的
Typedef
指针
c++
、
templates
、
pointers
、
typedef
我已经做了一个基本
的
链表,这个列表最初包含整数,我试图将这个列表更改为一个模板
类
。TLLNode<T>::TLLNode(T dataIn) : data(dataIn){ using TLLNode<T>* TLLPtr; 用于初始化和实现我
的
函数
的
列表
类
称为TLLNode* TLLPtr;,但是模板
的
typedef
似乎是非法
的
。我还没有在那篇文章
中
尝
浏览 1
提问于2015-03-21
得票数 0
回答已采纳
1
回答
类
模板
中
的
Typedef
计算
c++
、
templates
、
language-lawyer
、
typedef
struct X; struct Traits
typedef
typename Traits<T>::Container Container;}; struct Traits<X>
typedef
std::vector<X *> Container;{}main.cpp:9:30: error:
浏览 0
提问于2017-04-07
得票数 4
2
回答
类
内部
的
typedef
c++
、
typedef
我不能在
类
中
执行
typedef
吗?#include <vector> class List {
typedef
int Data;pair<iterator,bool> insert(const Data nodeId); //<-error class Node {
typedef
浏览 1
提问于2012-10-09
得票数 0
回答已采纳
2
回答
typedef
模板
类
实例
c++
、
templates
、
enums
我有阶级等级:
typedef
instrument<instrument_name:
浏览 0
提问于2015-09-11
得票数 1
回答已采纳
1
回答
使用
typedef
包含
类
c++
、
typedef
我有这样一个类型的人:我希望在我
的
所有源文件中都可以看到这个ty胡枝子。但是,将在其中定义该类型胡枝子
的
文件将不知道SomeClass
类
。唯一
的
解决方案是将SomeClass
的
头包含在定义
typedef
的
文件
中
。然而,这可能会导致许多问题,如圆形夹杂等。有什么聪明
的
方法这样做吗?
浏览 2
提问于2016-03-04
得票数 0
回答已采纳
2
回答
typedef
模板
类
错误
c++
、
compiler-errors
、
typedef
我有下面的课程class Matrix //stuff我正在做以下工作:然而,当我在另一个
类
中
声明以下内容时,我得到了错误:{ Matrix3D matrix;};error
浏览 0
提问于2012-04-19
得票数 1
回答已采纳
3
回答
模板
类
中
的
Typedef
不起作用
c++
、
templates
、
typedef
这可能是一个愚蠢
的
问题,但我盯着这段代码看了一段时间,想不出哪里出了问题。在编译时:#include <map> struct my_string_map {foo.cpp:8: error: expected primary-expression before ‘x’ ( my_string_map
类
的
定义
浏览 1
提问于2011-07-03
得票数 3
1
回答
在父
类
中
包含子类
的
typedef
c++
我有一个
类
,看起来像这样。我更喜欢在父
类
中
包含ParentMember
的
类型定义,并将其重命名为Member。这怎么可能呢?我能看到
的
唯一方法是让std::vector作为公共成员,而不是使用继承。
typedef
std::pair<std::string, boost::any> ParentMember; class Parent: public std::vector<ParentMember
浏览 2
提问于2012-09-13
得票数 1
回答已采纳
1
回答
嵌套模板化
类
的
Typedef
c++
、
templates
在.hpp文件
中
我有class SomeClass { class InnerClass {//Some stuff
typedef
std::map<std::string, InnerClass> InnerMapType;在我拥有的.cpp文件
中
InnerMapType::iterator iter;
浏览 0
提问于2012-01-29
得票数 1
回答已采纳
2
回答
模板
类
中
的
Typedef
不起作用
c++
、
class
、
templates
、
typedef
、
typename
我对以下代码有问题:class lamePtrpublic:}; class smarterPointer public: {
typedef
lamePtr<U> someType;在smarterPointer
类
中
,我有一个函数funFun()。我想要做
的
是
浏览 0
提问于2011-04-03
得票数 8
回答已采纳
1
回答
在派生
类
模板
中
访问基
类
typedef
c++
、
templates
我正在尝试从派生
类
模板访问基
类
中
的
typedef
成员。在模板
中
,模板参数
的
名称与基
类
中
的
typdef
的
名称相同。#include <iostream> class no {
typedef
int T;template<typenameconversion from '
浏览 2
提问于2015-11-03
得票数 6
1
回答
如何在不同
的
类
中
交叉引用
typedef
?
c++
在A
类
中
,我定义了一个类型,即A_T:在B
类
中
,我定义了另一个类型,即B_T:如果我必须在A
的
头文件中使用B_T,在B
的
头文件中使用在A.hpp
中
,我需要包含B.hpp和使用B::B_T,所以对于B,那么必须有一个交叉引用,如何解决?
浏览 0
提问于2013-03-30
得票数 0
回答已采纳
4
回答
具有嵌套模板
的
C++类型定义不是
类
、结构或联合类型
c++
、
templates
、
typedef
、
typename
我不太明白为什么下面的代码不是用g++编译
的
:t.cpp:28:56: instantiated from类型#include <vector> class Solution public:}; cla
浏览 0
提问于2012-07-10
得票数 5
回答已采纳
3
回答
作为可重写
类
特性
的
TypeDef
c++
、
typedef
如果我有一个包含许多
typedef
'd变量
的
类
,如下所示:{fillData(&data);} 是否有任何方法覆盖派生
类
中用于
typedef
的
TokenType?注:这不是一个使用模板
的
好地方(这已经是一个模板
类
,任何更改都可能导致编辑:无限递
浏览 4
提问于2009-04-14
得票数 4
回答已采纳
1
回答
如何访问模板模板
类
的
typedef
c++
、
templates
、
typedef
在尝试编译以下代码时:{class Managerpublic:}; 我得到以下错误: 管理器:错误:类型“prog.cpp:15”不是从类型“Container”派生
的
浏览 2
提问于2012-07-03
得票数 1
1
回答
Typedef
变量
的
模板
类
编译问题
c++
、
templates
、
typedef
我在使用更新
的
C++编译器编译模板
类
时遇到了问题(从VisualVISUAL6.0到VisualC++ 2015)。所有的错误都集中在
类
中
的
几个类型缺陷上。下面是头文件
的
一个片段:{
typedef
Type* iterator;
typedef
浏览 0
提问于2018-09-05
得票数 0
点击加载更多
热门
标签
更多标签
云服务器
对象存储
ICP备案
云点播
实时音视频
活动推荐
运营活动
广告
关闭
领券