-1
#include <iostream.h>
#include <windows.h>
#include<conio.h>

void gotoxy(short x, short y) 
{
	HANDLE hConsoleOutput;
	COORD Cursor_Pos = {x, y};

	hConsoleOutput = GetStdHandle(STD_OUTPUT_HANDLE);
	SetConsoleCursorPosition(hConsoleOutput, Cursor_Pos);
}

void clrscr(void) {
	CONSOLE_SCREEN_BUFFER_INFO csbi;
	HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
	COORD coord = {0, 0};
	DWORD count;
	
	GetConsoleScreenBufferInfo(hStdOut, &csbi);
	FillConsoleOutputCharacter(hStdOut, ' ', csbi.dwSize.X * csbi.dwSize.Y, coord, &count);
	SetConsoleCursorPosition(hStdOut, coord);
}
{
getch();
}

Deleting intermediate files and output files for project 'chellee - Win32 Debug'.
--------------------Configuration: chellee - Win32 Debug--------------------
Compiling...
chellee.cpp
c:\documents and settings\dartbeat\chellee.cpp(24) : error C2447: missing function header (old-style formal list?)
Error executing cl.exe.

chellee.exe - 1 error(s), 0 warning(s)

Edited by Ezzaral: Added code tags. Please use them to format all code that you post.

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by LevyDee
0

You didn't ask a question, but your problem is on line 23 and 24. It thinks there is a new function there, but you have no header for it(as the error states). Delete lines 24, 25 and 26, unless that getch() is a part of your clrscr() function. in that case, delete lines 23 and 24.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.