Today I defined a class in a header file, and implement it in a cpp file. It is so usually to write a c++ program.
However, the compiler of Visual C++ 6.0 reported me that there is not a class or type storage. When I merged the implement
part and the defined part into a file, everything is right.
What happened?
However, the compiler of Visual C++ 6.0 reported me that there is not a class or type storage. When I merged the implement
part and the defined part into a file, everything is right.
What happened?
作者在使用Visual C++ 6.0进行C++编程时遇到了类定义与实现分离的问题。当类定义位于头文件中,而实现部分在.cpp文件中时,编译器报告找不到类或类型存储。然而,当将定义与实现在同一文件中时,问题得以解决。
769

被折叠的 条评论
为什么被折叠?



