Add a VS 2K8 express template for .c

This is a discussion on Add a VS 2K8 express template for .c within the C Programming forums, part of the General Programming Boards category; I'd like to add a simple .c template to MS visual studio C++ 2008 express edition. Right now the only ...

  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    2

    Add a VS 2K8 express template for .c

    I'd like to add a simple .c template to MS visual studio C++ 2008 express edition. Right now the only template I have as a choice are .cpp and .h, which I don't want to use. The .cpp does work on these simple C programs, but I want to follow the course as closely as possible.

    As a workaround I'm adding a new txt file, saving it as a .c file, and then adding it to my existing project. A lot of steps when a simple template would do the trick. Thanks for any suggestions.

    V

  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,473
    you do not need a template

    do the following to add new c-file

    right-click on the "Source file" folder in your project
    Select add/new Item
    Select c++ file template
    In the Name filed write the file name with extention like new_file.c
    It will be added to the project and compiled as c-file
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  3. #3
    Registered User
    Join Date
    Feb 2008
    Posts
    2
    Thanks vart. I read somewhere someone suggesting the new file be named as you suggested, though it wasn't by right clicking on source and adding the file that way. Anyway, I only tried it once and ended up with test.c.cpp, which made me give up on that method. I assumed I didn't have something setup correctly. As it turns out, I must have started the project incorrectly because now that I'm a little more comfortable with the SW, I can't even replicate it. Thanks for knocking me on the head.

    V

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. error: template with C linkage
    By michaels-r in forum C++ Programming
    Replies: 3
    Last Post: 05-17-2006, 08:11 AM
  2. Template question
    By grscot in forum C++ Programming
    Replies: 1
    Last Post: 04-29-2003, 03:12 PM
  3. Search and Build Tree
    By 1999grandamse in forum C++ Programming
    Replies: 17
    Last Post: 11-14-2002, 12:36 PM
  4. Add and delete functions
    By Ana Val sazi in forum C++ Programming
    Replies: 5
    Last Post: 06-18-2002, 09:59 PM
  5. Linked list with two class types within template.
    By SilasP in forum C++ Programming
    Replies: 3
    Last Post: 02-09-2002, 05:13 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21