| | |
linking error
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
Usually you are supposed to have 2 files per class.
Header file: ClassName.h, which declares the class interface.
Source file: ClassName.cxx/cpp/.. which defines the class. I.e. has implementation for the class's interface.
Assuming you have A.h and A.cpp, to use A's variables in another class B, you'll have to #include "A.h" in B.cpp (or B.h depending on need)
Header file: ClassName.h, which declares the class interface.
Source file: ClassName.cxx/cpp/.. which defines the class. I.e. has implementation for the class's interface.
Assuming you have A.h and A.cpp, to use A's variables in another class B, you'll have to #include "A.h" in B.cpp (or B.h depending on need)
Are you Agile.. ?
![]() |
Similar Threads
- Linking 2 files. (C)
- Linking Error (C++)
- Linking Error... (C++)
- Linking error messages when building program (C)
- Linking Error In C (C)
Other Threads in the C++ Forum
- Previous Thread: WinSocket question
- Next Thread: Tic Tac Toe with Classes Problem
Views: 747 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for C++
6 api application array arrays based beginner binary c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll dynamiccharacterarray email encryption error file format forms fstream function functions game generator givemetehcodez graph iamthwee ifstream image input int java lib list loop looping loops map math matrix memory multiple newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg search simple sort sorting spoonfeeding string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets





