void FloodScreen(WORD Props)
{
bool Done = false;
CHAR_INFO Flood;
Flood.Char.AsciiChar = char('DB');
Flood.Attributes = Props;
COORD BufferSize = {1,1};
COORD Position = {0,0};
SMALL_RECT WArea = {0,0,0,0};
while (!Done)
{
WriteConsoleOutput(wHnd, &Flood, BufferSize, Position, &WArea);
if (Position.x >= 80)
{
Position.y += 1;
Position.x = 0;
}
Position.x += 1;
if (Position.y >= 26)
{
Done = true;
}
}
}
struct COORD, Members
I'm now working with ASCII graphics in color, thanks to Benryves, and I have been writing my own functions to cover all of the console stuff. I decided to make a function called "FloodScreen(WORD Props)". Now, the code says:
But here's the problem: it's telling me that struct COORD has no member such as x or y. Well, I type "Position." and it had a list of three floats: x, y, and z. I need to use these so that I can finish this function, but it says "'struct COORD' has no member named x". Any clues on why? (If you want to see for yourself, include stdlib.h, windows.h, and stdio.h)
Come on guys..don't ignore me.. this problem isn't solved yet.. BTW, if I put my mouse over the variable name, it says that it has something to do with Direct3D.
Quote:Come on guys..don't ignore me.. this problem isn't solved yet.. BTW, if I put my mouse over the variable name, it says that it has something to do with Direct3D.
SiCrane already explained:
Quote:COORD has two members: X and Y. Your intellisense is probably confused.
Note the capitalization.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement