Search
 
SCRIPT & CODE EXAMPLE
 

CPP

c++ cmd program run in background

#include <windows.h>  
#include <iostream>     
using namespace std;


int main () {   
    cout<<"Some  information is displayed.. 

";
    Sleep(5000);

    cout<<"wait.. the console is going to hide and run in background.. 
";
    Sleep(5000);

    ShowWindow(FindWindowA("ConsoleWindowClass", NULL), false);

    while(true) {
                 // Do your hidden stuff in here
    }   
return 0;
}
Comment

how to run a c++ program in the background

HWND window;
AllocConsole();
window = FindWindowA("ConsoleWindowClass", NULL);
ShowWindow(window,0);
Comment

PREVIOUS NEXT
Code Example
Cpp :: C++ convert vector of digits into integer 
Cpp :: push front vector cpp 
Cpp :: c++ code for selection sort 
Cpp :: combination code c++ 
Cpp :: double to string c++ 
Cpp :: c++ map loop through key value 
Cpp :: c++ looping 
Cpp :: delete last char of string c++ 
Cpp :: built in led 
Cpp :: operands c++ 
Cpp :: prints out the elements in the array c++ 
Cpp :: c++ switch case break 
Cpp :: in c++ the default value of uninitialized array elements is 
Cpp :: tuple c++ 
Cpp :: c++ cin operator 
Cpp :: memcpy c++ usage 
Cpp :: c++ add object to array 
Cpp :: c++ template example 
Cpp :: cpp float to string 
Cpp :: How to pause a c++ program. 
Cpp :: iterate over 2 vectors c++ 
Cpp :: string to int c++ 
Cpp :: input in c++ 
Cpp :: c++ get string between two characters 
Cpp :: deque c++ 
Cpp :: c++ output 
Cpp :: palindrome program in c++ 
Cpp :: prisma client 
Cpp :: 3d vector c++ resize 
Cpp :: c++ filesystem read directory 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =