【发布时间】:2009-08-20 05:59:13
【问题描述】:
可能重复:
main.cpp access member function of another .cpp witin same source file
我在同一个源文件中使用了两个 cpp 文件 另一个.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;
}
提前谢谢..
【问题讨论】:
-
stackoverflow.com/questions/1304035/… 的重复请编辑您的原始问题,而不是提出新问题。
-
好的。。谢谢你的建议