C++ programming design

This is a discussion on C++ programming design within the C++ Programming forums, part of the General Programming Boards category; Hey guys, I was looking into c++ console programming design and I know that pseudocode can be used but are ...

  1. #1
    182
    182 is offline
    Registered User
    Join Date
    Oct 2005
    Posts
    133

    C++ programming design

    Hey guys, I was looking into c++ console programming design and I know that pseudocode can be used but are there any other techniques can be used for a non object oriented program?

    Thanks.

  2. #2
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,069
    You're talking like pseudocode was some sort of design method. Procedural programming is procedural programming. It's very straight forward. You do this, then you do this, then you do this until this happens, then you do this... etc, etc...

    There is no real technique to it. Just be as standard as possible.
    Sent from my iPadŽ

  3. #3
    182
    182 is offline
    Registered User
    Join Date
    Oct 2005
    Posts
    133
    I see thanks for your help and once again sorry for a newbie question.

  4. #4
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,069
    Ask another newbie question and I'll report you!

    Seriously, stop apologizing. I've seen questions 100 times worse, and besides we all have to start somewhere sometime.
    Sent from my iPadŽ

  5. #5
    Registered User Kurisu's Avatar
    Join Date
    Feb 2006
    Posts
    62
    Are you looking for something like flow charts? They are a nice alternative to Pseudocode.
    Last edited by Kurisu; 02-15-2006 at 08:03 PM.

  6. #6
    182
    182 is offline
    Registered User
    Join Date
    Oct 2005
    Posts
    133
    I will do some research on flow charts do you know of any good examples?

  7. #7
    Registered User Kurisu's Avatar
    Join Date
    Feb 2006
    Posts
    62
    here's an image of a basic flowchart:
    http://www.rff.com/basic_flowchart_house_painting.htm

    It uses the process of painting a house as an example.

    The squares represent functions or actions to perform while diamonds are choices often coded as ifstatements.

    A flowchart basically allows you to visually represent the flow of your program before you code it. Saves you alot of time and errors later as you can map out all possibilities with a flowchart then simply convert it to code.

    Here is a more lengthy version.. say if you were coding a car simulator for manual transmission:

    http://www.rff.com/stick_shift_flowchart.htm
    Last edited by Kurisu; 02-15-2006 at 10:09 PM.

  8. #8
    CS Author and Instructor
    Join Date
    Sep 2002
    Posts
    511
    Well there are also:

    Structure Charts

    and

    Nassi Schneiderman Diagrams
    Mr. C: Author and Instructor

  9. #9
    Registered User
    Join Date
    Mar 2002
    Posts
    203
    Quote Originally Posted by Kurisu
    Here is a more lengthy version.. say if you were coding a car simulator for manual transmission:
    I'd so tearup that car

  10. #10
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    pseudocode is way overrated. If you can code it in pseudocode why not code it in real code instead and just fill in the blanks afterwards (like type declarations and error handling?).

    charts are far better, whether flowcharts or the more modern sequence diagrams.

  11. #11
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    Posts
    546
    I should probably get around to using a design method but I never bother. Just finished a puny 8KB (or 210 line) program without bothering to design it first. Virtually everything is in main but oh well.

    Back to the subject a bit, I'd probably use a flowchart for showing how the general sections of the program work and then use pseudocode for those sections.

  12. #12
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    Generally, I use flowcharts while designing the large picture. Then I find the parts that should be fleshed out a bit before coding, where there is easily a loss of efficiency and/or it is just a part that would be hard to code on the fly, and psuedocode them.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. which design is better to wrap another class instance
    By George2 in forum C++ Programming
    Replies: 7
    Last Post: 04-13-2008, 12:27 AM
  2. any comments about a cache design?
    By George2 in forum C Programming
    Replies: 6
    Last Post: 09-14-2006, 12:53 PM
  3. Implementing Inheritence into your design
    By bobthebullet990 in forum C++ Programming
    Replies: 6
    Last Post: 08-05-2006, 04:40 PM
  4. Cprog tutorial: Design Patterns
    By maes in forum C++ Programming
    Replies: 7
    Last Post: 10-11-2004, 01:41 AM

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