stray characters...

This is a discussion on stray characters... within the C Programming forums, part of the General Programming Boards category; following is my header file.... Code: #ifndef __ACKRV__ #define __ACKRV__ #include <stdio.h> #include ”header.h” unsigned char ack_check(adt *); #endif when ...

  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    46

    stray characters...

    following is my header file....
    Code:
    #ifndef __ACKRV__
    #define __ACKRV__ 
    #include <stdio.h>
    #include ”header.h”
    unsigned char ack_check(adt *);
    #endif
    when i enter command as below
    it gave following output.

    0000000 357 273 277 # i f n d e f _ _ A C K
    0000020 R V _ _ \n # d e f i n e _ _ A
    0000040 C K R V _ _ \n # i n c l u d e
    0000060 < s t d i o . h > \n # i n c l
    0000100 u d e 342 200 235 h e a d e r . h 342
    0000120 200 235 \n u n s i g n e d c h a r
    0000140 a c k _ c h e c k ( a d t *
    0000160 ) ; \n # e n d i f \n
    0000172

    why it is considering extra characters like 357 273 277 etc....

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Did you use something like notepad to create the file? It looks like the UNICODE start markers. You need to use a non-unicode editor for C programming (just copy'n'paste it into a non-unicode editor).

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User
    Join Date
    Aug 2008
    Posts
    46
    what are those UNICODE and non unicode characters????

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,014
    Quote Originally Posted by matsp View Post
    You need to use a non-unicode editor for C programming (just copy'n'paste it into a non-unicode editor).
    That part is untrue, however.
    The default mode for Visual Studio is unicode files.
    ----------
    The answer to your question anyway is:
    use a better editor.
    http://cpwiki.sf.net/IDE
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A development process
    By Noir in forum C Programming
    Replies: 37
    Last Post: 07-10-2011, 11:39 PM
  2. Stray Error while compiling
    By Mankthetank19 in forum C Programming
    Replies: 6
    Last Post: 02-03-2011, 03:24 PM
  3. Replies: 10
    Last Post: 07-10-2008, 04:45 PM
  4. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 05:54 PM
  5. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 07:39 AM

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