gotoxy() function is not working in Visual Studio

c, c++, visual-studio-2010

Solution

Are you talking about command line applications or windows applications? You must remember that VC2008 is a windows specific development environment, so if you were learning programming on a linux/unix or an older dos system then things will not be the same.

The only way I know of under windows to change the position of the cursor in a console application is to use the windows function SetConsoleCursorPositon.

http://msdn.microsoft.com/es-es/library/windows/desktop/ms686025(v=vs.85).aspx

I hope this helps you!

Problem

I'm not able to use gotoxy() function in Visual Studio 2010. Is there any alternative for that?

Original source