g++ error: expected ‘)’ before ‘*’ token
原本*号前面的类型是我用typedef自定义的类型的,MyType* const p;
发生这样的错误是,编译器根本不知道MyType是什么东西,这是我在C++多重继承中遇到的。MyType是我在基类中public中定义的类型,结果在它的孙子类发生出这样的情况,不识别这个新类型。但是儿子类中也有MyType类型,却没有报错。
在孙子类中根据基类重新typedef下MyType就好了,编译器就能识别次类型了。
reference:
http://stackoverflow.com/questions/3720034/error-expected-before-token
g++ error: expected ‘)’ before ‘*’ token的更多相关文章
- g++  error: expected nested-name-specifier before 'XXX'
		template <typename addrT=int,typename valuT=int,typename stream_addrT=bm_addr,typename stream_siz ... 
- 坑备忘error: expected class-name before '{' token
		今日重构之前的代码,修改了命名空间,然后一处派生的子类定义处总是总是报error: expected class-name before '{' token,网上查了查原因,出现这种情况大致有两种情况 ... 
- error: expected constructor, destructor, or type conversion before '.' token
		今天写代码是遇到这样一个问题error: expected constructor, destructor, or type conversion before '.' token:立马网上查,原来是 ... 
- 错误解决:error: expected ‘;’, ‘,’ or ‘)’ before ‘&’ token
		今天看到一个比较有趣的题目,如下代码,分析输出结果 #include <stdio.h> void num(int &b) { b = 222; return; } int mai ... 
- Centos 7 成功安装 dosbox  解决 "error: expected primary-expression before ‘,’ token" 错误
		dosbox-0.74 bug 修复版下载: http://download.csdn.net/detail/yangbodong22011/9663271 注意:这篇博客解决了下面这个问题,如果你也 ... 
- linux shell-syntax error near unexpected token错误
		在windows下用记事本编写linux shell脚本后,执行遇到syntax error near unexpected token错误 问题原理:网上找了好久,找到原因,原来是回行的问题,每个系 ... 
- Error: expected expression, got '}'
		1.错误描述 Error: expected expression, got '}' .globalEval/<@http://localhost:8080/Sys/resource/globa ... 
- Error_Unix Shell_syntax error near unexpected token `fi'
		2014-06-19 BaoXinjian 1. Issue 调用如下Shell脚本时出现错误syntax error near unexpected token `fi' 
- 关于报错“syntax error near unexpected token `”和回车换行
		本来是很简单一个事情,转过来是因为打字机这事比较有趣…… http://blog.csdn.net/xyp84/archive/2009/08/11/4435899.aspx 摘要一下: 回车 换行 ... 
随机推荐
- logstash 防止实际处理时间跟事件产生时间略有偏差
			"message" => " 10.168.255.134 [12/Sep/2016:16:30:40 +0800] \"GET /resources/p ... 
- C++关于strcpy等函数的安全版本
			如下程序: #include <iostream> using namespace std; int main() { ]; strcpy(ch1,"); } 在VS2012上面 ... 
- spring框架源码编译
			程序猿小菜一枚,最近从github上面下载下来一份spring各个项目的源码一份,但是弄了很长时间,因为网速和(fanqiang)的速度,希望大家不要再为这种无谓的时间花费时间,简单来说github上 ... 
- OpenWrt刷机
			http://blog.163.com/l1_jun/blog/static/14386388201441344612/ http://blog.chinaunix.net/uid-25073805- ... 
- springmvc工作原理和环境搭建
			SpringMVC工作原理 上面的是springMVC的工作原理图: 1.客户端发出一个http请求给web服务器,web服务器对http请求进行解析,如果匹配DispatcherServle ... 
- 深入理解Scala的隐式转换系统
			摘要: 通过隐式转换,程序员可以在编写Scala程序时故意漏掉一些信息,让编译器去尝试在编译期间自动推导出这些信息来,这种特性可以极大的减少代码量,忽略那些冗长,过于细节的代码. 使用方式: 1. ... 
- 编码规范(HTML)
			code { font-family: "PT Mono", Menlo, "Courier New", monospace; padding: 2px 4px ... 
- Qt之操作Excel
			Visual Basic for Applications(VBA)是一种Visual Basic的一种宏语言,主要能用来扩展Windows的应用程式功能,特别是Microsoft Office软件. ... 
- Android编译过程详解(二)
			通过上篇文章,我们分析了编译android时source build/envsetup.sh和lunch命令,在执行完上述两个命令后, 我们就可以进行编译android了. 1. make 执行ma ... 
- C# 文件操作(一)
			1.说明: 写入文件内容,如果文件中有内容,则进行追加,目录是程序集下的目录 public static void WriteLog(string value) { try { //目录是程序集下的D ... 
