re: Challenge: Write a program that never stops VIEW POST

FULL DISCUSSION
 

C++

#include <iostream>
int main(int argc, char* argv)
{
    std::cout << "argc is " << argc << std::endl;
    std::cout << main(argc, argv);
    return main(1, {'H', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd', '\0'});
}

C++ (even though the syntax highlithing is set to python)

#include <my_awesome_events_manager_lib>
using namespace my_awesome_events_manager_lib;
int main(void)
{
    auto playing = true;
    while (playing)
    {
        // handle events /!\
        if (getEvent()->type == QUIT) playing = !playing;
    }
    return 0x0;
}
code of conduct - report abuse