Spacing issue...(diff command)

This is a discussion on Spacing issue...(diff command) within the Tech Board forums, part of the Community Boards category; Spacing issue... So with the diff command i'm seeing weird results These two phrases are literally stacked on top of ...

  1. #1
    Registered User
    Join Date
    Oct 2012
    Posts
    140

    Spacing issue...(diff command)

    Spacing issue...

    So with the diff command i'm seeing weird results

    These two phrases are literally stacked on top of each other. Word for word and yet diff considers them different.

    "as a percentage of the course grade>"
    "as a percentage of the course grade>"

    I don't there is a line break issue? extra spaces anywhere in the program?

    What gives?

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,749
    Maybe the line endings are different.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Oct 2012
    Posts
    140
    Well that sucks since my instructor's .out file is private i have no way to see whats different.

  4. #4
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,389
    Maybe one has a '\n' at the start of end of it and the other doesn't
    Fact - Beethoven wrote his first symphony in C

  5. #5
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,749
    Ask your instructor for help.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  6. #6
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,389
    Quote Originally Posted by tmac619619 View Post
    Well that sucks since my instructor's .out file is private i have no way to see whats different.
    Maybe you do -> Make a little program to print out the ASCII value of each character

    i.e.
    Hello world =
    [0x48][0x65][0x6C]...
    Fact - Beethoven wrote his first symphony in C

  7. #7
    Registered User
    Join Date
    Oct 2012
    Posts
    140
    If only i knew how my instructor positioned his \n.

    It sucks that diff command is useless in this situation, it doesn't even help.

  8. #8
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,555
    Nothing to do with C, moved to tech.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A question about Linux's "diff" command
    By meili100 in forum Tech Board
    Replies: 4
    Last Post: 09-17-2008, 02:35 AM
  2. Can I issue a command to DOS from within a program?
    By Sukarn in forum Windows Programming
    Replies: 2
    Last Post: 12-22-2006, 06:44 AM
  3. why does this code do something diff on 2 diff boxes?
    By crypto_quixote in forum C Programming
    Replies: 3
    Last Post: 03-08-2005, 11:11 AM
  4. Spacing?
    By trenzterra in forum C++ Programming
    Replies: 5
    Last Post: 11-28-2002, 09:42 PM
  5. Diff compiler == diff program????
    By Imperito in forum C++ Programming
    Replies: 21
    Last Post: 04-25-2002, 12:50 PM

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