Linux Error Extra Qualification
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have
Extra Qualification In Resume
Meta Discuss the workings and policies of this site About Us extra qualification in cv Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads
Extra Qualification On Member Xcode
with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, c++ cannot be overloaded just like you, helping each other. Join them; it only takes a minute: Sign up extra qualification error in C++ up vote 54 down vote favorite 4 I have a member function that is defined as follows: Value JSONDeserializer::ParseValue(TDR type, const json_string& valueString); When I compile the source, I get: error: extra qualification 'JSONDeserializer::' on member c++ undefined reference to 'ParseValue' What is this? How do I remove this error? c++ g++ compiler-errors share|improve this question edited Feb 27 '15 at 19:30 Ian R. O'Brien 3,10853158 asked Apr 12 '11 at 22:28 prosseek 42.5k107351627 add a comment| 4 Answers 4 active oldest votes up vote 97 down vote accepted This is because you have the following code: class JSONDeserializer { Value JSONDeserializer::ParseValue(TDR type, const json_string& valueString); }; This is not valid C++ but Visual Studio seems to accept it. You need to change it to the following code to be able to compile it with a standard compliant compiler (gcc is more compliant to the standard on this point). class JSONDeserializer { Value ParseValue(TDR type, const json_string& valueString); }; The error come from the fact that JSONDeserializer::ParseValue is a qualified name (a name with a namespace qualification), and such a name is forbidden as a method name in a class. share|improve this answer edited Dec 30 '13 at 13:11 answered Apr 12 '11 at 22
&other)
Cpp Class
{ int hour = (*this).getHour() + other.getHour(); constructor c++ int min = (*this).getMinute() + other.getMinute(); int sec = (*this).getSecond()+
C++ Operator
other.getSecond(); When I compile the source, I got error: Date.cpp:16:12: error: extra qualification ‘Time::’ on member ‘operator+’ [-fpermissive] http://stackoverflow.com/questions/5642367/extra-qualification-error-in-c const Time Time::operator+(const Time &other) ; What is this? How do I remove this error? it run fine with Visual Studio Oct 14, 2013 at 12:00am UTC ne555 (8588) http://www.eelis.net/iso-c++/testcase.xhtml http://www.cplusplus.com/forum/articles/40071/#msg216313 Oct 14, 2013 at 12:05am http://www.cplusplus.com/forum/beginner/113473/ UTC zakelong81 (28) 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#include
Login: [x] User account creation filtered due to spam. Bug26785 - "extra qualification" error gives line number of http://gcc.gnu.org/PR26785 end of declaration Summary: "extra qualification" error gives line number of end http://forums.codeguru.com/showthread.php?474280-gcc-error-extra-qualification of declaration Status: RESOLVED FIXED Alias: None Product: gcc Classification: Unclassified Component: c++ (show other bugs) Version: 4.1.0 Importance: P3 minor Target Milestone: 4.4.0 Assignee: Not yet assigned to anyone URL: Keywords: diagnostic Depends on: Blocks: Reported: 2006-03-21 17:03 UTC by Martin Michlmayr Modified: 2008-08-06 16:42 UTC extra qualification (History) CC List: 4 users (show) debian-gcc gcc-bugs manu mueller See Also: Host: Target: Build: Known to work: Known to fail: Last reconfirmed: 2006-03-21 17:06:09 Attachments Add an attachment (proposed patch, testcase, etc.) Note You need to log in before you can comment on or make changes to this bug. Description Martin Michlmayr 2006-03-21 17:03:08 UTC The line number extra qualification in mentioned in the "extra qualification" error is not ideal. Instead of showing the line number on which the extra qualification actually occurs it shows the last line of the declaration. (sid)6102:tbm@deprecation: ~] cat > test.cpp class foo { foo::foo(int a, int b, int c); }; int main() { } (sid)6103:tbm@deprecation: ~] g++ test.cpp test.cpp:4: error: extra qualification `foo::' on member `foo' I'd like to see "test.cpp:2: ..." here. Presumably it checks things like that after reading a complete declaration. I would have thought it could track what the first line of the declaration was though. seen with: gcc version 4.1.0 20060219 (prerelease) (Debian 4.1-0exp9) gcc version 4.0.3 (Debian 4.0.3-1) [using -pedantic] Comment 1 Andrew Pinski 2006-03-21 17:05:28 UTC This is the crazy parser getting the line number "wrong". Comment 2 Dirk Mueller 2006-10-16 15:22:11 UTC ehm, this is the same with any warning/error message? why would this case be special? Comment 3 Martin Michlmayr 2006-10-16 15:38:57 UTC (In reply to comment #2) > ehm, this is the same with any warning/error message? why would this case
Forum Visual C++ & C++ Programming C++ (Non Visual C++ Issues) gcc error: extra qualification If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register or Login before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 8 of 8 Thread: gcc error: extra qualification Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode April 2nd, 2009,11:50 AM #1 tzadik View Profile View Forum Posts Member Join Date Jan 2009 Location new york,usa Posts 49 gcc error: extra qualification i got the following when trying to compile a header file: Code: cube512.h:12: error: extra qualification 'cube512::' on member 'cube512' now i know this is default with gcc4.1 and up. my question is there a compiler switch to suppress this? thanks. t. Reply With Quote April 2nd, 2009,12:17 PM #2 laserlight View Profile View Forum Posts Elite Member Power Poster Join Date Jan 2006 Location Singapore Posts 6,702 Re: gcc error: extra qualification Show the smallest and simplest program that demonstrates the error. C + C++ Compiler: MinGW port of GCC Build + Version Control System: SCons + Bazaar Look up a C/C++ Reference and learn How To Ask Questions The Smart Way Kindly rate my posts if you found them useful Reply With Quote April 2nd, 2009,03:09 PM #3 tzadik View Profile View Forum Posts Member Join Date Jan 2009 Location new york,usa Posts 49 Re: gcc error: extra qualification Code: #ifndef BLOCK_H #define BLOCK_H class block{ public: block::block(){ } }; #endif and... Code: #include