Search:

Type: Posts; User: Karakus

Search: Search took 0.00 seconds.

  1. SetConsoleTextAttribute(Get..., int x)? How does it work

    I have a function:

    void color(int x)
    {
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), x);
    }
    I don't understand how the x works, when do I get the foreground and the background, I...
  2. Replies
    4
    Views
    1,575

    Ok, thanks ;). I added the whole function to the...

    Ok, thanks ;).
    I added the whole function to the functions.h file (I didn't know what a prototype was), and the deprecation was string.h and iostream.h.
  3. Replies
    4
    Views
    1,575

    I made a new header, "functions.h", but so, the...

    I made a new header, "functions.h", but so, the functions were also needed by the main.cpp and I included it also to the main.cpp, now I get:
    The Build log:
    .objs\main.o:main.cpp:(.text+0x100):...
  4. Replies
    4
    Views
    1,575

    Functions in class and class variables.

    The class doesn't sees the function "place();" in the main.cpp and the int x and int y is also not recognized when using it in the functions owned by the class:


    #ifndef ORGAN_H
    #define ORGAN_H...
  5. Replies
    5
    Views
    967

    It works, thanks.

    It works, thanks.
  6. Replies
    5
    Views
    967

    I wanted to define thje player.x before the "int...

    I wanted to define thje player.x before the "int main", it gives errors, that's the reason. I did it define before the function, I didn't explain my problem well.

    Now I have another error:...
  7. Replies
    5
    Views
    967

    Struct defining in function parameters?

    I'm work for a snake game in console mode, I want that my:
    struct Player{int x,y;};
    gets in the funtion parameter:


    void movedir(struct Player,int i)//strut Player has errors.
    {
    ...
Results 1 to 7 of 7