Member Avatar for anu07

I was going through my computer book,and I saw that "\a" can be used to emit a sound in c++,and I tried it as well,but my question is,is it possible to do the same without showing the standard output screen......??

You can hide the console window if you want to. In MS-Windows you have to use win32 api functions to do it.

#include <windows.h>

int main()
{
   HWND hWnd = GetConsoleWindow();
   ShowWindow(hWnd,SW_HIDE);
}
Member Avatar for anu07

and umm I am using borland cpp 4.5 for compiling......so like anything tht might be compatible with it? :?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.