Thread: Stray backslash

  1. #1
    Registered User
    Join Date
    Apr 2017
    Posts
    1

    Stray backslash

    I was tasked with reviewing some older code for revision however, I've run into numerous instances where the syntax is written like the following:

    char t [5\]

    The compiler throws an error: stray '\' in program, etc... (not a problem - fixed)

    I've not seen this syntax before, can someone identify it? A specific compiler language, etc?

    Thanks and Regards,


  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    It seems to me like sloppy editing on the part of the original author, and sloppy compilers not spotting the problem before now.
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Conditional to check for backslash , \
    By seal308 in forum C Programming
    Replies: 17
    Last Post: 01-30-2016, 11:24 AM
  2. stray '@' in program
    By hilbert16 in forum C++ Programming
    Replies: 2
    Last Post: 10-05-2010, 06:21 AM
  3. stray characters...
    By vapanchamukhi in forum C Programming
    Replies: 3
    Last Post: 09-22-2008, 04:43 AM
  4. Stray octal 127? Waaaaaaaaa?
    By Terran in forum C++ Programming
    Replies: 4
    Last Post: 07-07-2008, 02:13 AM
  5. stray octal 0223 in program
    By reRanger in forum C++ Programming
    Replies: 3
    Last Post: 11-23-2004, 02:45 AM

Tags for this Thread