[ create a new paste ] login | about

Link: http://codepad.org/jgbbBDhK    [ raw code | output | fork ]

hmurcia - C++, pasted on Apr 30:
// using box, color, gotoxy and msgBox functions
#include <windows.h>
#include <ctime>
#include "mylib.h"

int main() {
    const int N = 12;
    char rll[] = "\xdb\x20\xb0\xb1\xb2\xa9\xb8";
    int x1, y1, x2, y2, t, r, c;
    srand(time(0));

    for (int i=0; i<25; i++)
        cout << "0123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345678\n";

    for (int i=0; i<N; i++) {
        x1 = intb2in(0, 78), y1 = intb2in(0, 23), x2 = intb2in(0, 78-x1), y2 = intb2in(0, 24-y1);
        t = intb2in(0, 1),  r = rll[intb2in(0, 7)];
        c = i + 25;
        box(x1, y1, x2, y2, t, r, c);
    }
    system("pause>nul");
    clrscr();
    for (int x=1; x<255; x++)
        color(x), cout << "Esto esta en otro color (" << x << ").\n";
    system("pause>nul");
    clrscr();
    msgBox(12, 15, "Hello World!!!!!", 110);
    system("pause>nul");
    return 0;
}


Output:
1
2
3
4
5
Line 20: error: windows.h: No such file or directory
Line 18: error: mylib.h: No such file or directory
In function 'int main()':
Line 16: error: 'intb2in' was not declared in this scope
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: