🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.lang.learn.c-c++
Article #106

Re: Problematic Program

#106
From: Jon Bell
Date: Sun, 20 Oct 2002 23:55
27 lines
2395 bytes
In article <HIacndmZkvBvgy6gXTWcoA@comcast.com>,
CM <mckenzie992@comcast.net> wrote:
>
> [...]  I believe I have corrected all the errors however a
>huge mess at run-time.  again, not sure what direction to take, if you could
>be so kind as to give your feedback (or anyone else for that matter)

Here's a piece of advice for your *next* program (probably too late to do 
any good on this one):  *don't* try to write and debug the whole thing at 
once!  As you've seen, this leads to tons of compiler errors, and then if 
you have logic problems it can be a major task to straighten them out.

Instead, you should first sketch an outline of the overall structure of 
the program, then write and debug it in stages, a few lines at a time.  As 
you get more experience, you'll be able to make each stage bigger.  Add 
extra output statements to verify that variables contain what they're 
supposed to contain, loops are working the way they're supposed to work, 
etc.  When you're done testing and debugging, remove those extra output 
statements.

Oh, and get in the habit of indenting and formatting your code 
consistently as you write it.  It will make it a lot easier for you to see 
problems.

-- 
Jon Bell <jtbellap8@presby.edu>                     Presbyterian College
Dept. of Physics and Computer Science        Clinton, South Carolina USA
Technical Details
Message-ID: <H4B13z.Mrp@presby.edu>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!presby.edu!not-for-mail
References: <ESudnc40b4i4hS6gXTWcow@comcast.com> <3db31a56$1_1@mk-nntp-1.news.uk.worldonline.com> <HIacndmZkvBvgy6gXTWcoA@comcast.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d4ba,635d58b7486c58ea
X-Google-Attributes: gid10d4ba,public
X-Google-Thread: 109fba,635d58b7486c58ea
X-Google-Attributes: gid109fba,public
X-Google-Thread: 114592,635d58b7486c58ea
X-Google-Attributes: gid114592,public
X-Google-ArrivalTime: 2002-10-20 17:02:08 PST
Newsgroups: alt.comp.lang.learn.c-c++,att.lang.c++,comp.lang.c++
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!presby.edu!not-for-mail
From: jtbellq2f@presby.edu (Jon Bell)
Subject: Re: Problematic Program
Originator: jtbell@presby.edu (Jon Bell)
Sender: news@presby.edu (Usenet News)
Message-ID: <H4B13z.Mrp@presby.edu>
Date: Sun, 20 Oct 2002 23:55:11 GMT
X-Nntp-Posting-Host: cs2
Reply-To: jtbellap8@presby.edu
References: <ESudnc40b4i4hS6gXTWcow@comcast.com> <3db31a56$1_1@mk-nntp-1.news.uk.worldonline.com> <HIacndmZkvBvgy6gXTWcoA@comcast.com>
Organization: Presbyterian College, Clinton SC, USA
X-Newsreader: trn 4.0-test74 (May 26, 2000)
Lines: 27