#include <iostream>
#include <conio.h>
#include "a2.cpp"
int main(int argc, char ** argv)
{
te::A a1(5);
std::cout << a1.display() << std::endl;
return 0;
}
This means that it a2.cppis in the same folder as a1.cpp. However, it is better to make this a header file.
You should keep in mind that this should usually be avoided using namespace XX;, and you should just have direct material. egstd::cout
, conio.h C edit:, cout, C++. (Credits to DeadMG , . ).