Search:

Type: Posts; User: kooma

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    2,510

    allegro causing a crash

    Oh why does the following code crash after all is done? And how does the copier in vector.push_back work while the commented out line looses the image in bms (after you uncomment it...)?


    ...
  2. Replies
    10
    Views
    2,619

    http://freshmeat.net/projects/uconio/

    http://freshmeat.net/projects/uconio/
  3. Replies
    3
    Views
    1,139

    Compiles just fine (after changing void main to...

    Compiles just fine (after changing void main to int!) with DJGPP...
  4. Thread: big numbers

    by kooma
    Replies
    15
    Views
    2,055

    printf("%0.0f", f); ;-)

    printf("%0.0f", f);

    ;-)
  5. Thread: make files

    by kooma
    Replies
    2
    Views
    958

    At least in gcc (DJGPP, etc): name: makefile...

    At least in gcc (DJGPP, etc):

    name: makefile
    type: make (in the same folder of course)
  6. Thread: Just wondering

    by kooma
    Replies
    2
    Views
    874

    An object is bend, but the shape stays, so that...

    An object is bend, but the shape stays, so that the shortest distance between two points is 0.
  7. Replies
    2
    Views
    1,014

    Those black boxes are just characters that are...

    Those black boxes are just characters that are not defined in the font-file, so dig up some characterers that aren't in the specific font file you're using and you'll get a blox or something...
  8. Replies
    3
    Views
    1,051

    Well, you can overload () for it and by that way...

    Well, you can overload () for it and by that way treat it as 2D. And as I said, it's a long story...
  9. Replies
    3
    Views
    1,051

    So, no overloading [][]?

    I have a 1D array that is treated as a 2D (long story). Is there a way to get calls like array[i][j] work? operator[][] (int x, int y) gives me a syntax error...
  10. Replies
    4
    Views
    1,926

    char c; c = getchar(); if(c == '1') ...

    char c;
    c = getchar();
    if(c == '1')
    do_something();
    else if(c == '2')
    do_something_else();
    else if(c == '3')
    do_something_completely_different();
    else
    printf("Invalid option,...
  11. Replies
    14
    Views
    1,267

    2 - always.

    2 - always.
  12. Replies
    6
    Views
    1,757

    About the original problem: char dir[9];...

    About the original problem:



    char dir[9];
    cin >> dir;
    if(strcmp(dir, "left"))
    move left
  13. Replies
    12
    Views
    3,109

    You bastard... :)

    You bastard... :)
  14. Thread: Bacspacing tab

    by kooma
    Replies
    2
    Views
    897

    Bacspacing tab

    If the user presses TAB the cursor will go forward (8-(CURRENT_COLUMN_IN_THE_SCREEN%8)) spaces. Now, when I press TAB and then backspace what would be the ideal thing to count how many columns...
  15. Replies
    2
    Views
    2,341

    char *s = "123"; int i = atoi(s); char *ss =...

    char *s = "123";
    int i = atoi(s);
    char ........ = itoa(i);

    Guess you could ask the Borland q here....
  16. Replies
    2
    Views
    1,542

    void check_flags(int moves[], int flags[], int...

    void check_flags(int moves[], int flags[], int win_lose);
    should be
    void check_flags(int moves[], int flags[][7], int win_lose);
  17. Thread: Memory Game!

    by kooma
    Replies
    1
    Views
    9,334

    First, you need a structuce: struct Card {...

    First, you need a structuce:


    struct Card
    {
    int number, value;
    bool found;
    };
  18. Replies
    26
    Views
    33,234

    With a computer other than my own, the biggest...

    With a computer other than my own, the biggest issue is the spacebar (usually they're bit more harder to push than my own) and loose keys...
  19. Thread: fputc(0x0A,file)

    by kooma
    Replies
    2
    Views
    1,857

    If 0x0D is what I think it is - carriage return -...

    If 0x0D is what I think it is - carriage return - try opening the file in binary mode.
  20. Replies
    2
    Views
    10,071

    And do switch your scanf() to fgets() for the...

    And do switch your scanf() to fgets() for the sake stability!
  21. Replies
    4
    Views
    1,107

    if((ch == '\b') && (i > 0)) { printf("\b...

    if((ch == '\b') && (i > 0))
    {
    printf("\b \b");
    i--;
    sEntry[i] = '\0'; // Need this one?
    }


    ps.
    No need for that kbhit()...
  22. Replies
    8
    Views
    1,202

    Ah! Could someone explain that code a bit? It...

    Ah! Could someone explain that code a bit? It works, alright but
    char s[n];
    getstr(s, m);
    doesn't - not that it's a problem that is easily fixed with some polymorphzation but why.
  23. Replies
    8
    Views
    1,202

    And of course I have tried passing s from main o...

    And of course I have tried passing s from main o get_string:



    void get_string(char *s, size_t maxlen)
    {
    ...
    if(s == NULL)
    s = new char[str.size()+1];
  24. Replies
    8
    Views
    1,202

    strcpy(pstring, function())

    Now I have a function const char *get_string(size_t maxlen) where the significant part according to this problem is like



    vector<char> str;
    ...
    char *s = new char[str.size()+1];

    /* Copy...
  25. Thread: __getc in DJGPP

    by kooma
    Replies
    1
    Views
    1,049

    __getc in DJGPP

    What's this mystic __getc() that I see in libc's source (djlsr203.zip ) all the time? I can't find sources for that (and not really that anxious to download extra 20 megs). I guess that the...
Results 1 to 25 of 130
Page 1 of 6 1 2 3 4