🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Having a SetConsoleCursorPosition prob

Started by
0 comments, last by Jeff D 22 years, 6 months ago
Well I''ve been trying my hardest to make a hangman game usuing windows.h console commands. Now I made function that looks like this:
  
void PrintString(int x, int y, string print)
{

	COORD cursor = {x, y};
	
	SetConsoleCursorPosition(H_OUTPUT, cursor);

	cout << print;

}

  
This allows me to print anything I want anywhere. I made the LetterBox that works. The letters apear where they belong. I made the line for the words to be solved also when you press a letter if it is in it will appear where it belongs on the lines. I made the hanging post. However when started to make the man to be hanged he will appear at the last console position not at the coordinates. Now I am wondering the program is like 400 lines should I just post it up here?? Then if you are trying to help me you could just copy and paste? Thx Jeff Suffered seven plagues, but refused to let the slaves go free. ~ Ross Atherton
Suffered seven plagues, but refused to let the slaves go free. ~ Ross Atherton
Advertisement
your out put is buffered. do a cout.flush() or just use printf(). i think you can even to
  cout << string << count.endl  


or something like that. i am not too familar with the c++ io stream functions, but this sort of question has been asked so many times here on gamedev

also to reply to your sig. (technically this would go before your sig)

The apparently benovolent Lord decreed that seven plagues affect all that opposed him, including innocent subjects and slaves he sought to free. ~ a person

This topic is closed to new replies.

Advertisement