![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multiple crontab entries crashing server | alexandicity | Linux | 2 | 05-12-2008 06:25 AM |
| Sun Fire v1280 is crashing | esofthub | UNIX for Advanced & Expert Users | 2 | 06-02-2007 01:57 PM |
| memory functions crashing in AIX | abhinav05252 | High Level Programming | 0 | 12-07-2006 03:46 AM |
| dlclose crashing in 64bit | ajphaj | High Level Programming | 3 | 12-05-2006 03:44 AM |
| It's first class! | Leksej | UNIX Desktop for Dummies Questions & Answers | 0 | 06-16-2006 09:30 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
i just started learning to prog in c++, im using netbeans.
i tryed to make a class and i keep getting this error. what am i doing wrong ? ----------------------------- class test { public: int funtime(); private: int time; }; int test::funtime() { return time; } --------------------------- when i try to build i keep getting the error /home/leandro/netbeans/testjes/testklasse.cc:13: multiple definition of `test::funtime()' thnx in advance |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Did you try compiling it on the command line, e.g.
g++ test.cpp -c -o test.o ? Your pasted snippet works for me. |
|
#3
|
|||
|
|||
|
mmm ill explain better
------------------------- overvieuw ![]() main ![]() class rubbish that gives the error ![]() my output ![]() |
|
#4
|
||||
|
||||
|
change the filename to rubbish.h where you define the class rubbish, and include it as # include "rubbish.h" in the main file. Otherwise i don't see anything else wrong.
|
|
#5
|
|||
|
|||
|
Quote:
that worked thnx |
|||
| Google The UNIX and Linux Forums |