can we define a class in one c++ source file and main function in another c++ source file in the same folder and then implement that class.
Printable View
can we define a class in one c++ source file and main function in another c++ source file in the same folder and then implement that class.
Oops. This is *C* forum.
Usually you define a class in a header file and implement it in a .cpp file.