Based on your comment you probably want to use the Process Class. I assume you want to write something to a different program. You will need to set the ProcessStartInfo.RedirectStandardInput Property to true. Look at the sample code in the documentation. Also if you need to also get output from the other program then see How to redirect Standard Input/Output of an application - CodeProject.
How can i uninclude a header int C++

So, obviously, there is a #include
function in c/c++, but I want to UNinclude a header. Does anyone know how?
2 answers
Sort by: Most helpful
-
rupesh shukla 16 Reputation points
2021-07-14T20:36:42.81+00:00 As other has already mentioned that you can use preprocessor directory to control your include file . But I am still not sure if I get your question. What are you trying to accomplish here. Because you can have hook in your other application and you can trap mouse click event and based on your click your preprocessor can act the way you want .
But In your question I still didn't get "once you click the mouse in the win32 app project in the solution, it outputs something in another console app project" then where this include def/undef is coming in picture.
Thanks
You cannot automatically undo everything that an
#include
has done. You can however selectively and explicitly undo much of what it has done, although experts will say to use a different solution to any problem. So as has been said already, please provide specific details of what you need to do. Note that#include
is not a function, it is a pre-processor statement.Ok. So I am making it so that in my solution, once you click the mouse in the win32 app project in the solution, it outputs something in another console app project. so I want to change the header, then sort of uninclude it.