Thread: Keep running program and 'int' problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    note the separated blocks of lines and where variable declarations should be put
    IMHO that is more of a personal preference. It is required in C but not C++. Some people recommend declaring variables just before they are used in C++.

  2. #2
    coder
    Join Date
    Feb 2008
    Posts
    127
    you are right cyberfish, I often declare variables not at beginning too.

    By the way, in that case these declarations stay well out of the loop
    Last edited by carlorfeo; 02-07-2008 at 07:21 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Debug Error Really Quick Question
    By GCNDoug in forum C Programming
    Replies: 1
    Last Post: 04-23-2007, 12:05 PM
  2. Personal Program that is making me go wtf?
    By Submeg in forum C Programming
    Replies: 20
    Last Post: 06-27-2006, 12:13 AM
  3. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM
  4. My Allegro Program will not run...
    By Vicious in forum Game Programming
    Replies: 17
    Last Post: 06-14-2002, 12:49 AM
  5. debug program
    By new_c in forum C Programming
    Replies: 3
    Last Post: 03-18-2002, 11:50 PM