c++ extra qualification

2013年01月15日 10:04:52 沈纵情 阅读数 9728
 

运行代码时候遇到了如下错误:

extra qualification ‘Complex::’ on member ‘Complex’

其代码如下:

Complex::Complex(double r)
        {
                m_real = r;
                m_imag = 0.0;
        }

Extra qualification error是使用版本4以上的GCC/G++编译C++程序时经常出现的错误。

这是语句中多引用了类的名称--把函数前面::的类名称去掉即可,如下:

Complex(double r)
        {
                m_real = r;
                m_imag = 0.0;
        }

c++ extra qualification的更多相关文章

  1. g++ error: extra qualification on member [-fpermissive]

    以下这段代码是在头文件里面的,DmaOpen DmaClose函数也是直接在class pcie_chip{}里面的.加了个额外的pcie_chip::才会报错. //delete pcie_chip ...

  2. Ubuntu10.04下安装Ns2的一系列错误及解决方案

    安装之前改一下nam1.11下的agent.h文件73行 Null改为0 第一个错误: xxx configuration: Syntax error: Unterminated quoted str ...

  3. iOS:消除项目中警告

    引言: 在iOS开发过程中, 我们可能会碰到一些系统方法弃用, weak.循环引用.不能执行之类的警告. 有代码洁癖的孩子们很想消除他们, 今天就让我们来一次Fuck 警告!! 首先学会基本的语句: ...

  4. 【转】clang warning 警告清单(备查,建议直接command + F 速查 )

    Warning Message -WCFString-literal input conversion stopped due to an input byte that does not belon ...

  5. 使用#pragma阻止一些warnings

    这篇博客的内容都是记的网上的.是流水账.只是记录下来以便日后之有,避免每次重新google. #pragma除了可以用来把不同功能的代码进行分隔组织外还可以用来disable一些warnings.这在 ...

  6. iOS -- warnings

    Semantic Warnings Warning Message -WCFString-literal input conversion stopped due to an input byte t ...

  7. 从VC到g++遇到的事

    最近做的项目,需要把代码从VC移植到g++下编译,在这个过程中,遇到了几个平台相关的问题--在VC下顺利编译的代码,但在g++中编译报错. 这里贴出来给大家分享一下: 1. 枚举类型 问题代码 enu ...

  8. IOS 警告 收集

    Semantic Warnings Warning Message -WCFString-literal input conversion stopped due to an input byte t ...

  9. ios deprecated 警告消除 强迫症的选择

    #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" ...

随机推荐

  1. FFMPEG 命令行工具- ffmpeg

    ffmpeg 简介 ffmpeg 用于转码的应用程序,命令格式: ffmpeg [options] [[infile options] -i infile]... {[outfile options] ...

  2. Flask+SQLAlchemy+graphene+docker示例

    搭建一个利用docker启动服务的Flask的小demo 定义数据库 # -*- coding: utf-8 -*- from sqlalchemy import * from sqlalchemy. ...

  3. Mycat配置项详解

     schema.xml文件配置中的balance属性和writeType属性: . balance=", 不开启读写分离机制,所有读操作都发送到当前可用的 writeHost 上. . ba ...

  4. 分布式限流组件-基于Redis的注解支持的Ratelimiter

    原文:https://juejin.im/entry/5bd491c85188255ac2629bef?utm_source=coffeephp.com 在分布式领域,我们难免会遇到并发量突增,对后端 ...

  5. httprunner学习2-har2case录制生成脚本

    前言 复制毁一生,录制穷三代,如果你只是因为不想写脚本,而去录制脚本,那我建议你还是别学录制了. 录制脚本,只是一个过渡,从0到1的一个过渡,如果让你直接写脚本,你会无从下手,可以将录制的脚本快速转化 ...

  6. Elasticsearch Date类型,时间存储相关说明

    资料 网址 Elasticsearch 插入时间字段时数据格式问题 https://segmentfault.com/a/1190000016296983 Elasticsearch Date类型,时 ...

  7. SQL语言基础和数据库操作

    Sql语言基础: 核心思想:我们自己构造一段查询的代码,然后添加到语句后,从而得到想要的某些数据. Mysql是一种开源数据库 APP Serv:Apache+php+mysql,相当于phpstud ...

  8. 【坑】js语法中一些小细节 不注意也出坑 随笔记下 留待后查

    1.switch case内 区分数字 与 字符 ',bl; switch(+lv){ :bl = 1.7;break; :bl = 1.55;break; :bl = 1.4;break; ; } ...

  9. react native 开发问题分类

    链接.编译.部署.运行: 一.语法问题:编译问题 二.链接问题: yarn add react-navigation react-native link react-navigation 三.部署问题 ...

  10. [Algorithm] 387. First Unique Character in a String

    Given a string, find the first non-repeating character in it and return it's index. If it doesn't ex ...