|
-
Link Error : already defined ??
I'm getting the following error when trying to Build the exe:
"file:student.obj : error LNK2005: "public: void __thiscall Student::getData(void)"
(?getData@Student@@QAEXXZ) already defined in main.obj"
I've got a main.cpp, student.cpp, and student.h.
The main.cpp basically calls the getData and showData functions in student.cpp.
The student.h file defines a Student class, consisting of Name, Age, GPA.
I've put the "#ifndef, #define, #endif" in the student.h. I'm not sure why
I'm getting an error saying the getData (and showData) function is already
defined.
Any help will be greatly appreciated!!
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks