![]() |
|
#1
|
|||
|
|||
Error??can someone compile & run this and tell me what the error means...
http://www.anova-design.com/misc/largeint.h http://www.anova-design.com/misc/main.cpp main.cpp contains main, and it inlcludes largeint.h Thanks, Austin |
|
#2
|
|||
|
|||
What's the problem?Does no one know the answer to http://www.gidforums.com/t-3587.html?
|
|
#3
|
||||
|
||||
Don't get upset.Quote:
__________________
Common Sense v2.0-Striving to make the world a little bit smarter. |
|
#4
|
|||
|
|||
|
Quote:
Compiling... main.cpp c:\documents and settings\austin\my documents\desktop\desktop\largeint\largeint.h(146) : error C2662: 'Compare' : cannot convert 'this' pointer from 'const class LargeInt' to 'class LargeInt &' Conversion loses qualifiers c:\documents and settings\austin\my documents\desktop\desktop\largeint\largeint.h(149) : error C2662: 'Divide' : cannot convert 'this' pointer from 'const class LargeInt' to 'class LargeInt &' Conversion loses qualifiers c:\documents and settings\austin\my documents\desktop\desktop\largeint\largeint.h(161) : error C2662: 'Compare' : cannot convert 'this' pointer from 'const class LargeInt' to 'class LargeInt &' Conversion loses qualifiers c:\documents and settings\austin\my documents\desktop\desktop\largeint\largeint.h(163) : error C2662: 'Compare' : cannot convert 'this' pointer from 'const class LargeInt' to 'class LargeInt &' Conversion loses qualifiers c:\documents and settings\austin\my documents\desktop\desktop\largeint\largeint.h(17 Conversion loses qualifiers c:\documents and settings\austin\my documents\desktop\desktop\largeint\largeint.h(180) : error C2662: 'Compare' : cannot convert 'this' pointer from 'const class LargeInt' to 'class LargeInt &' Conversion loses qualifiers Error executing cl.exe. main.obj - 6 error(s), 0 warning(s) |
|
#5
|
||||
|
||||
|
[edit]Thread was merged.[/edit]
You would be best off asking whoever it was that wrote largeint.h. __________________
-Aaron |
|
#6
|
||||
|
||||
|
Quote:
They mean that you can't change a member data of the object in a const member function: CPP / C++ / C Code:
You pass to Compare LargeInt(0), and in it you MODIFY private member data vector<char> number;. You can't do this! I made it run by removing most of your consts....not necesarilly the way to go, but in the time given... (I'm a busy man )Regards, Luci __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
|
#7
|
|||
|
|||
|
Quote:
Thank you so much. I really appreciate your help. Austin |
Recent GIDBlog
Last Week of IA Training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Operator Overloading: << | aaroncohn | CPP / C++ Forum | 36 | 07-Dec-2004 19:22 |
| link error? | pablowablo | CPP / C++ Forum | 14 | 19-Jun-2004 10:00 |
| OpenGL always reports error | mvt | OpenGL Programming | 2 | 04-Jun-2004 06:42 |
| Visual C++ 6 Compiler error | vip3r | CPP / C++ Forum | 2 | 13-Apr-2004 14:34 |
| [script] E-mail webmaster error page | BobbyDouglas | PHP Code Library | 0 | 19-Aug-2003 20:10 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The