Change the default code on new project (cpp file)? Topic is solved

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Post Reply
PureForceX
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Sep 05, 2012 5:32 pm

Change the default code on new project (cpp file)?

Post by PureForceX »

Hello wx community!

I'm a new user of wxDev-C++ and enrolled in a beginners' programming course.
All our assignments (console applications) are required to have a specific comment section at the top of our source code.
I would like this information automatically entered each time I start a new project, rather than the "copy, paste" method.

How and where can I change this default code using the wxDev-C++ UI?
Thanks in advance for your help :)

I would like to add:

Code: Select all

//my name
//course title, instructor name
//assignment name
//date
//program file name
//program details
...to the top of (before) the current default code:

Code: Select all

#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    cout << "Press the enter key to continue ...";
    cin.get();
    return EXIT_SUCCESS;
}
Last edited by PureForceX on Fri Sep 07, 2012 4:48 pm, edited 1 time in total.
PureForceX
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Sep 05, 2012 5:32 pm

Re: Change the default code on new project (cpp file)?

Post by PureForceX »

NOTE: This only works if you have administrative privileges.
  1. Locate default text file C:\Program Files (x86)\Dev-Cpp\Template\ConsoleApp_cpp.txt
  2. Change user permissions to full control.
  3. Save a backup copy of the original in a safe place. ;)
  4. Open the file, edit & save changes, restore default file permissions.
  5. Verify changes made: Open a new console application project, you should see the new default code now.
Last edited by PureForceX on Mon Sep 17, 2012 3:01 pm, edited 1 time in total.
tbreina
Moderator
Moderator
Posts: 1289
Joined: Thu Nov 25, 2004 7:38 pm
Location: Coronado, CA

Re: Change the default code on new project (cpp file)?

Post by tbreina »

Yes, PureForceX has the "correct" procedure.

-Tony
Everybody's got something to hide except for me and my monkey.
PureForceX
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Sep 05, 2012 5:32 pm

Re: Change the default code on new project (cpp file)?

Post by PureForceX »

tbreina wrote:Yes, PureForceX has the "correct" procedure.

-Tony
Thanks, Tony!
- Matt
Post Reply