namespace

I am trying to build an executable on linux platform using a c++ file, but i am receving some errors while trying to make.please help!!


the errors i receive are as follows:

g++ -c -o tagfunction.o tagfunction.cpp
tagfunction.cpp: In function ‘int main()’:
tagfunction.cpp:19: error: no matching function for call to ‘rfid::Mac::Mac()’
mac.h:180: note: candidates are: rfid::Mac::Mac(const rfid::Mac&)
mac.h:65: note: rfid::Mac::Mac(std::auto_ptr<rfid::MacTransport>)
tagfunction.cpp: At global scope:
tagfunction.cpp:122: error: expected unqualified-id before ‘return’
make: *** [tagfunction.o] Error 1


the c++ file i am using is having namespace used in it.
please can i know how to call funtions defined in namespace from main function?
|
You'll need to post the mentioned code.
I think your problem is that you defined a constructor for Mac, and as soon as you
do that, the compiler no longer gives you a default constructor -- you have to
explicitly define it. On line 19 you are attempting to default construct a Mac.
Topic archived. No new replies allowed.