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...
Type: Posts; User: Karakus
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...
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.
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):...
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...
It works, thanks.
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:...
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.
{
...