Another thing you can do is make a shortcut to a cmd window that runs a batch file that sets the path for that window only:
(call it mingw.bat or something)
Then, create a shortcut (right click on the desktop, new, shortcut) and put %COMSPEC% /k c:\yourbatchfilepath\mingw.bat (change the Start in: directory to wherever your code is, so it goes to that directory each time).
Then, once you have your file above saved as native.cpp (or something) invoke the compiler by typing g++ native.cpp -o yourexecname
You could also add a registry key to allow compiling by simply right-clicking on a .cpp file and selecting 'Compile This' (or whatever you want to call it).
To do this, open your registry editor Start > Run > type regedit (enter). Expand the folders HKEY_CLASSES_ROOT > * > shell. Now right-click the shell folder and select New > Key. Rename the newly created folder 'Compile this' and then right-click that folder and create another new key called 'command' (it must be called command). Select the command folder and double click the entry '(Default)' (over on the right). Change its value data to:
If that's not the path to your g++ compiler, then correct it; if it has spaces, use quotes for the path as well. Close the registry editor and you should be good to go. Find a CPP file and use your new quick compile feature and it should output an executable file in the same directory called 'a.exe'. Don't forget to rename a.exe before compiling another program or it will be overwritten.