Thread: "warning: null character(s) ignored" after copy&paste

  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    101

    Question "warning: null character(s) ignored" after copy&paste

    Hello!

    It's as the title says. I was coding and after I did a backup the second time I compile it I get lines and line of "warning: null character(s) ignored". The original I can compile as many times as I like.

    What the hell is going on?

    Thanks in advance

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    See that spot right there? That's the problem.


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

  3. #3
    Registered User
    Join Date
    Apr 2008
    Posts
    101
    Very funny, as it obviously wasn't code related I didn't post the code. As I didn't remember anything else to post I didn't post anything else. You could just nicely asked for the code or whatever you feel is missing.
    Sometimes if you spent less time complaining noobs don't ask the question in exactly the right way you would see, you have all the info you need.

    Actually just after I posted this I realized that the problem was the command for compiling "g++ nodeQueues_v5_charNextPrev.c -o nodeQueues_v5_charNextPrev.c"

  4. #4
    Registered User
    Join Date
    May 2011
    Location
    Around 8.3 light-minutes from the Sun
    Posts
    1,949
    As quzah pointed out you provided little actual information about your problem with the exception of the warning message. A couple things off the top of my head:

    1. Are you transferring this file between different systems? Like say Windows to *nix?
    2. Try copying the file into notepad, saving that, and then try to compile the notepad copy.
    3. Is it possible you saved the new copy in a Unicode format, vice ascii?

    Also information on the compiler and OS would be helpful. Transferring between different text editors can be problematic, where these null characters you are getting warned about could be different whitespace characters (tab, newline, ect.) that your current setup doesn't recognize.
    Quote Originally Posted by anduril462 View Post
    Now, please, for the love of all things good and holy, think about what you're doing! Don't just run around willy-nilly, coding like a drunk two-year-old....
    Quote Originally Posted by quzah View Post
    ..... Just don't be surprised when I say you aren't using standard C anymore, and as such,are off in your own little universe that I will completely disregard.
    Warning: Some or all of my posted code may be non-standard and as such should not be used and in no case looked at.

  5. #5
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,909
    The first thing you should do is Google for your problem. Googling your error message brought up several sites that discussed the same or similar problems. Second, you should search the forum for previous threads about your problem, so we don't have to answer the same question dozens of times. This site has at least one such thread that Google found for me, and I haven't even used the forum's search capability yet.

    After sufficient research, you should tell us what you found/didn't find related to your problem. You should post links to other sites or threads that deal with the problem and say "I tried XYZ from site ABC, but it didn't work for me", or "all of these apply to Windows/Linux incompatibilities, but I think mine is a Unicode issue".

    Then, you should post your exact code with a full error message, especially the part that gives a file name and line number. You should also tell us what your backup process was and what you copy-pasted to/from.

    Note: I think yours might be a Unicode issue. Try converting your other file to ASCII if possible.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. "warning: multi-line character constant"
    By Benzakhar in forum C++ Programming
    Replies: 7
    Last Post: 08-24-2008, 03:29 PM
  2. Replies: 46
    Last Post: 08-24-2007, 04:52 PM
  3. Specifying a "null" character
    By Mavix in forum C Programming
    Replies: 3
    Last Post: 09-13-2006, 06:50 AM