Hello, I have done some research and keep getting results to hide the console window. What I would like to do is to hide the output of a command. For example, I have a segment that renews the PC's IP connection, so I get a long stream of the new IP address, subnet mask, DNS, etc. I know you can output to a text file, is there some modification to this that just does not show this at all?


just try this , if not worked reply back.

#include <windows.h> // hope you already did this 

ShowWindow( GetConsoleWindow(), SW_HIDE );

Same answer as in this thread that was posted within the past 9 hours.

I don't think that is what I am looking for, unless I am misunderstanding the rest of that post. I want to only hide a specific portion of a loop. For example: (general portion of code)

#include <iostream>
using namespace std;
int main() {
cout<<"Renewing internet connection\n";
system("ipconfig/renew"); //If you have a better way to do this, please share :-)

I specifically want to hide the output results of the ipconfig, skipping to the next input.

Never use system() on Windows (see MSDN, basic rule)
Use Network apis (IPH)