C++ Line Numbers?

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> #include "line_numbers.h" using namespace std; BEGIN_PROGRAM case -20: cout << "Negative line numbers are AOKAY" << endl; case -10: return 0; case 0: cout << "Using 'line numbers' in C++" << endl; case 100: cout << "Let's GOTO!" << endl; case 200: GOTO(400); case 300: cout << "Won't see this line!" << endl; case 400: cout << "Hello World!" << endl; case 450: cout << "Let's GOSUB!" << endl; case 460: GOSUB(600); case 470: cout << "Returned from sub!" << endl; case 499: cout << "The end. Fin. Done." << endl; case 500: return 0; case 600: cout << "The subroutine!" << endl; case 610: GOSUB(499); case 620: GOSUB(-20); case 700: return 0; END_PROGRAM
#ifndef LINENUMBERS_H_6d9737bc1ea44b46b8e3937e3ac5e2ca #define LINENUMBERS_H_6d9737bc1ea44b46b8e3937e3ac5e2ca #define GOTO(X) { line = (X); break; } #define GOSUB(X) { main((X), NULL); } #define BEGIN_PROGRAM int main(int line, char* argv[]) { while(true) { switch(argv == NULL ? line : (argv = NULL, 0)) { #define END_PROGRAM default: return 0; } } } #endif
Editor Settings
Theme
Key bindings
Full width
Lines