tags:

views:

247

answers:

2

I recently began learning C++ in order to reach people w/o .net. I need to run my program in the background(without any visual indication to the user so no window or cmd). I know there a various methods to do this In C#, but I don't know how to do this in C++ (specifically Dev-C++). Any help is greatly appreciated.

+3  A: 

First of all, you shouldn't be using Dev-C++. If you really don't want to use Visual Studio (why not? it's free!) then Code::Blocks or Eclipse or something is a better choice. Dev-C++ hasn't been updated in like 5 years...

The ways of creating background processes in C++ is basically the same as in C#, you just don't get the enormous class library that C# has which handles most of the work for you.

Your main choices are windows services, or creating a regular windows application and simply not displaying any windows... which one you choose depends on your specific requirements (do you want it run even when no one is logged in, or do you want it associated with a logged-in user, etc)

Dean Harding
I want to get away from .NET. Don't get me wrong I LOVE C# but the reason I'm trying to learn C++ is so that I have the option to work without it.
Lienau
@Lienau: Visual Studio supports C++. Code::Blocks supports C++. However you really should go to a command line compile option and manual makefiles to really understand what is going on.
Yann Ramin
Visual Studio, Code::Blocks and Eclipse can all do native C++. As I said, Dev-C++ has not been updated in over five years and is really starting to show it's age. But that's kind of off-topic for your question anyway... the rest of my answer still applies.
Dean Harding
A: 

You need to be creating a Windows GUI application and not a console application (or else the console window will show). Then, just don't create any windows.

erjiang