Thread: How to look at mulitple versions of same program

  1. #1
    Registered User
    Join Date
    May 2017
    Posts
    1

    How to look at mulitple versions of same program

    Hello all!
    I am new to C Programming and just started studying via "The C Programming Language" using Code Blocks. In the book they start with an initial program and then modify it, for example, originally using %d then using %f for a calculation. My question is there a way in Code Blocks or another IDE that I can have a copy of each program up in my project as I modify my initial program so I can track my progress or a lack of better term?

    Thanks
    Street

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    38,621
    A crude way is to simply copy the file program.c to program_v1.c, then copy to program_v2.c and so on.

    You can then load all of them into your IDE to read side by side as you want.

    But once you get past the random tinkering with single source files, you'll want a better approach.
    6 Version Control Systems Reviewed – Smashing Magazine
    Source control systems allow you to do things like
    - keep many versions of the same code - as you add a new feature, you make a new version.
    - do diffs between versions to see what changed, or help you figure out why it broke.
    - make branches to allow experimental changes you might want to throw away if it doesn't work out.
    - facilitate teamwork with co-developers.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Socket Programming (Handing mulitple connections help)
    By shivam1992 in forum C# Programming
    Replies: 5
    Last Post: 02-24-2012, 09:52 AM
  2. Mulitple Inheritance
    By DMJ in forum C++ Programming
    Replies: 1
    Last Post: 08-09-2004, 11:48 AM
  3. Mulitple I/O streams
    By thamisfit in forum C Programming
    Replies: 3
    Last Post: 03-22-2003, 04:15 PM
  4. searching a string for mulitple characters
    By cxs00u in forum C++ Programming
    Replies: 1
    Last Post: 04-27-2002, 03:46 PM
  5. Program Versions
    By Jperensky in forum C Programming
    Replies: 3
    Last Post: 03-15-2002, 06:21 PM

Tags for this Thread