可能重複:
main.cpp access member function of another .cpp witin same source file訪問提供了兩個.cpp文件
我使用相同的資源文件中 another.cpp 這裏我用一個類和成員2個cpp文件功能 一樣,
Another.cpp
class A
{
public :
int Add();
};
int A::Add()
{
-----
-------
}
------------------
main.cpp
here also,
class B
{
--------
}
int main()
{
here ,can i possible to create an object for class A and access Add function without(using without header file is important)...
return 0;
}
在此先感謝..
http://stackoverflow.com/questions/1304035/main-cpp-access-member-function-of-another-cpp-witin-same-source-file的重複,請改爲編輯提出了新的你原來的問題一。 – Naveen 2009-08-20 06:09:38
烏拉圭回合的建議 – Rajakumar 2009-08-20 06:15:56