Thread: [VS 2005] Auto generated skeleton code

  1. #1
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709

    [VS 2005] Auto generated skeleton code

    Is there any way to change it? Typically I change this:

    Code:
    int _tmain (int argc, TCHAR* argv[])
    {
            return 0;
    }
    To this:

    Code:
    int main (int argc, char* argv[])
    {
            return 0;  // and I replace the tab in front of this with spaces
    }
    I just wondered if there's any way to specify what the skeleton code is?

    EDIT: While I'm asking questions about 2005: Does anybody else get this weird problem where you type something and it takes like 3 seconds to appear in the editor? It only seems to happen after I've compiled and to get it back to normal I have to re-start VS.
    Last edited by cboard_member; 03-06-2006 at 09:48 AM.
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  2. #2
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    First: I never use generators, if I want some skeleton I just copy in one I created myself.
    The skeleton you show has hidden code underneath which you don't see.
    VC will use a launcher that's actually just wrapping the _tmain() in main() and converting the char* to a wchar_t*.

    Second: Let it sit for a good while. Most likely it's generating the Intellisense database (and you should then get a message to that effect in the statusbar). Depending on project size and complexity this can take up to several hours. Small design fault in VC2005, in earlier versions it was lightning fast...

  3. #3
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    Yeah ok - thanks
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  4. #4
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    It's actually a good idea to learn how to work with _tmain and TCHARs. This allows your program to be unicode compliant which will allow you to support multiple languages. It can take a little while to get used to, but in the end it's worth it. (Obviously this only works if your application is Windows only).

  5. #5
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    Quote Originally Posted by bithub
    It's actually a good idea to learn how to work with _tmain and TCHARs. This allows your program to be unicode compliant which will allow you to support multiple languages. It can take a little while to get used to, but in the end it's worth it. (Obviously this only works if your application is Windows only).
    Yeah I thought that might be the case but I often port projects to Linux / GCC.
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM
  2. << !! Posting Code? Read this First !! >>
    By biosx in forum C++ Programming
    Replies: 1
    Last Post: 03-20-2002, 12:51 PM
  3. Replies: 0
    Last Post: 02-21-2002, 06:05 PM
  4. Replies: 4
    Last Post: 01-16-2002, 12:04 AM
  5. auto <cringe> generated <cringe> code <cringe>
    By RobS in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-22-2001, 04:46 AM