Thread: Why it is so that the commented line prints: ssbasb and with return he prints: sab ?

  1. #1
    Registered User
    Join Date
    Sep 2011
    Posts
    9

    Why it is so that the commented line prints: ssbasb and with return he prints: sab ?

    want to delete post, don't know how:S
    Last edited by rveger; 09-06-2011 at 01:29 AM.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Post the smallest and simplest compilable program that demonstrates the problem.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    The commented line is unreachable code. It doesn't matter if it's commented or not.


    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. always prints ASCII character 255
    By browser in forum C Programming
    Replies: 5
    Last Post: 11-07-2010, 10:37 AM
  2. Why the program prints line twice?
    By red463 in forum C Programming
    Replies: 15
    Last Post: 04-30-2010, 05:20 AM
  3. Object prints out its variable name
    By garf13ld in forum C++ Programming
    Replies: 12
    Last Post: 10-01-2007, 01:18 PM
  4. program that prints itself
    By modec in forum C Programming
    Replies: 1
    Last Post: 10-10-2003, 02:14 PM
  5. Printer Prints Printings
    By CodeMonkey in forum C++ Programming
    Replies: 1
    Last Post: 11-06-2001, 04:05 PM

Tags for this Thread