what's wrong with this code

This is a discussion on what's wrong with this code within the C++ Programming forums, part of the General Programming Boards category; You are also declaring x twice, once in the for statement and then in the cout. Declare it once, then ...

  1. #16
    Registered User
    Join Date
    Nov 2001
    Posts
    17
    You are also declaring x twice, once in the for statement and then in the cout. Declare it once, then just refer to x
    -----------------------------------------------
    everready

    To code, or not to code, that is the question.

    Well the answer is 'TO CODE' of cause

  2. #17
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    For loops:

    for(initialization; condition; increment)
    {
    loop-body
    }

    EVen if some of the italicizes parts are empty, the semi-colons need to be there.
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. what is wrong in this simple code
    By vikingcarioca in forum C Programming
    Replies: 4
    Last Post: 04-23-2009, 08:10 AM
  2. what is wrong with this code please
    By korbitz in forum Windows Programming
    Replies: 3
    Last Post: 03-05-2004, 10:11 AM
  3. I cant find what is wrong with this code
    By senegene in forum C Programming
    Replies: 1
    Last Post: 11-12-2002, 06:32 PM
  4. Anyone see what is wrong with this code?
    By Wise1 in forum C Programming
    Replies: 2
    Last Post: 02-13-2002, 02:01 PM
  5. very simple code, please check to see whats wrong
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 10-10-2001, 01:51 AM

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