I recently adopted a style where I try to avoid unnecesary classes / scopes, so the code cannot be splitted in files by classes or functions, since almost everything happens in main
. Of course for a lot of lines of code, this will be pretty hard to read, so I must split it somehow. I would like to do something like this:
#include <iostream>
int main()
{
#include "test.cpp"
return 0;
}
// test.cpp
std::cout << "Test";
Is there a way to tell the compiler to copy it exactly like that? And if yes, can I also make use of the IntelliSense (VS 2017)?