![]() |
|
#1
|
|||
|
|||
Visual C++ 6 Compiler errorI've run into a compiler error in Visual C++ 6 that I can't seem to find the source of. I was thinking some of you could help me?
CPP / C++ / C Code:
--------------------Configuration: test - Win32 Debug-------------------- Compiling... point.cpp C:\Documents and Settings\Ravi\My Documents\c++tutorial\point.cpp(16) : error C2556: 'int __thiscall point::setPositionX(int)' : overloaded function differs only by return type from 'void __thiscall point::setPositionX(int)' C:\Documents and Settings\Ravi\My Documents\c++tutorial\point.cpp(7) : see declaration of 'setPositionX' C:\Documents and Settings\Ravi\My Documents\c++tutorial\point.cpp(16) : error C2371: 'setPositionX' : redefinition; different basic types C:\Documents and Settings\Ravi\My Documents\c++tutorial\point.cpp(7) : see declaration of 'setPositionX' C:\Documents and Settings\Ravi\My Documents\c++tutorial\point.cpp(21) : error C2556: 'int __thiscall point::setPositionY(int)' : overloaded function differs only by return type from 'void __thiscall point::setPositionY(int)' C:\Documents and Settings\Ravi\My Documents\c++tutorial\point.cpp( C:\Documents and Settings\Ravi\My Documents\c++tutorial\point.cpp(21) : error C2371: 'setPositionY' : redefinition; different basic types C:\Documents and Settings\Ravi\My Documents\c++tutorial\point.cpp( test.cpp c:\documents and settings\ravi\my documents\c++tutorial\point.cpp(16) : error C2556: 'int __thiscall point::setPositionX(int)' : overloaded function differs only by return type from 'void __thiscall point::setPositionX(int)' c:\documents and settings\ravi\my documents\c++tutorial\point.cpp(7) : see declaration of 'setPositionX' c:\documents and settings\ravi\my documents\c++tutorial\point.cpp(16) : error C2371: 'setPositionX' : redefinition; different basic types c:\documents and settings\ravi\my documents\c++tutorial\point.cpp(7) : see declaration of 'setPositionX' c:\documents and settings\ravi\my documents\c++tutorial\point.cpp(21) : error C2556: 'int __thiscall point::setPositionY(int)' : overloaded function differs only by return type from 'void __thiscall point::setPositionY(int)' c:\documents and settings\ravi\my documents\c++tutorial\point.cpp( c:\documents and settings\ravi\my documents\c++tutorial\point.cpp(21) : error C2371: 'setPositionY' : redefinition; different basic types c:\documents and settings\ravi\my documents\c++tutorial\point.cpp( Error executing cl.exe. test.exe - 8 error(s), 0 warning(s) Thanks in advance, ravi Last edited by dsmith : 12-Apr-2004 at 20:44.
Reason: Please enclose code in [c] & [/c] for syntax highlighting
|
|
#2
|
||||
|
||||
|
Hello vip3r. Welcome to GIDForums.
When you do the implementation of your functions, you must also give the return value. So, it should be more like: CPP / C++ / C Code:
|
|
#3
|
|||
|
|||
ahQuote:
Ah, I see. Thanks for the welcome and the answer |
Recent GIDBlog
Writing a book by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in | ukrspp21 | MySQL / PHP Forum | 31 | 04-Jul-2006 22:41 |
| compilation error | cameron | C++ Forum | 18 | 20-Feb-2004 01:41 |
| Intel Compiler C++ for Embedded Visual C++ | kiara | C++ Forum | 1 | 15-Jan-2004 10:56 |
| Convertin C++ to eMbedded Visual C++ | jbalart | C++ Forum | 0 | 23-Dec-2003 07:44 |
| [script] E-mail webmaster error page | BobbyDouglas | PHP Code Library | 0 | 19-Aug-2003 21:10 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The