Warning!New windows update come out.

Monday, April 13, 2009

Typical solutions to the following errors in this compiler log?

OK, found a way to shorten this question...





The code itself is fairly long, so I posted the compiler log below. What are some typical problems/solutions that arise from these kind of error messages?





Compiler: Default compiler


Building Makefile: "C:\Dev-Cpp\Makefile.win"


Executing make...


make.exe -f "C:\Dev-Cpp\Makefile.win" all


g .exe -c AddressBook.cpp -o AddressBook.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/incl... -I"C:/Dev-Cpp/include/c /3.4.2/backward... -I"C:/Dev-Cpp/include/c /3.4.2/mingw32" -I"C:/Dev-Cpp/include/c /3.4.2" -I"C:/Dev-Cpp/include"





AddressBook.cpp:5: error: definition of implicitly-declared `AddressBook::AddressBook()'





AddressBook.cpp:5: error: declaration of `AddressBook::AddressBook()' throws different exceptions


AddressBook.h:8: error: than previous declaration `AddressBook::AddressBook() throw ()'


AddressBook.cpp:9: error: no `AddressBook::~AddressBook()' member function declared in class `AddressBook'





AddressBook.cpp:13: error: prototype for `void AddressBook::SetFirstName(std::string)' does not match any in class `AddressBook'


AddressBook.h:23: error: candidate is: void AddressBook::SetFirstName(const char*)


AddressBook.cpp: In member function `void AddressBook::SetFirstName(std::string)':


AddressBook.cpp:14: error: `first_' undeclared (first use this function)


AddressBook.cpp:14: error: (Each undeclared identifier is reported only once for each function it appears in.)


AddressBook.cpp: At global scope:


AddressBook.cpp:18: error: prototype for `std::string AddressBook::GetFirstName()' does not match any in class `AddressBook'


AddressBook.h:34: error: candidate is: void AddressBook::GetFirstName(char*, int) const


AddressBook.cpp: In member function `std::string AddressBook::GetFirstName()':


AddressBook.cpp:19: error: `first_' undeclared (first use this function)


AddressBook.cpp: At global scope:


AddressBook.cpp:23: error: prototype for `void AddressBook::SetLastName(std::string)' does not match any in class `AddressBook'


AddressBook.h:24: error: candidate is: void AddressBook::SetLastName(const char*)


AddressBook.cpp: In member function `void AddressBook::SetLastName(std::string)':


AddressBook.cpp:24: error: `last_' undeclared (first use this function)


AddressBook.cpp: At global scope:


AddressBook.cpp:28: error: prototype for `std::string AddressBook::GetLastName()' does not match any in class `AddressBook'


AddressBook.h:35: error: candidate is: void AddressBook::GetLastName(char*, int) const


AddressBook.cpp: In member function `std::string AddressBook::GetLastName()':


AddressBook.cpp:29: error: `last_' undeclared (first use this function)


AddressBook.cpp: At global scope:


AddressBook.cpp:33: error: no `void AddressBook::SetId(long int)' member function declared in class `AddressBook'





AddressBook.cpp: In member function `void AddressBook::SetId(long int)':


AddressBook.cpp:34: error: `id_' undeclared (first use this function)


AddressBook.cpp: At global scope:


AddressBook.cpp:38: error: no `long int AddressBook::GetId()' member function declared in class `AddressBook'


AddressBook.cpp: In member function `long int AddressBook::GetId()':


AddressBook.cpp:39: error: `id_' undeclared (first use this function)





AddressBook.cpp: At global scope:


AddressBook.cpp:43: error: no `void AddressBook::Populate()' member function declared in class `AddressBook'


AddressBook.cpp: In member function `void AddressBook::Populate()':


AddressBook.cpp:45: error: `first_' undeclared (first use this function)





AddressBook.cpp:48: error: `last_' undeclared (first use this function)


AddressBook.cpp:51: error: `id_' undeclared (first use this function)





make.exe: *** [AddressBook.o] Error 1





Execution terminated



When you define constructors with arguments you must also include a no argument constructor.





Also, it appears that you did not have the prototypes in the class definition.




computer programming service,web site design,homework help


custome website design etc, at


http://jsptutorials.org/




computer programming service,web site design,homework help


custome website design etc, at


http://learnasp.info/

No comments:

Post a Comment

Help on computer for you