In HTML, you have the ability to use more than one javascript file. So you can make an javascript file with an infinite loop that checks things, and your normal code running at the same time. Im using this for a multyplayer game in js, but I want to make it in c++ too. So how do I achieve this in c++?
I tried this:
#include <iostream> #include <fstream> #include "tick_update.cpp"
I tried to execute code in tick_update.cpp, but it didn't work. The int main function was already made, so the program was thinking that they were linked.