Thread: why i get this warning..

  1. #1
    Banned
    Join Date
    Oct 2008
    Posts
    1,535

    why i get this warning..

    Code:
    while(fgetc(file[1])!=NULL||fgetc(file[2])!=NULL||fgetc(file[3])!=NULL)
    warning C4047: '!=' : 'int' differs in levels of indirection from 'void *'

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    fgetc returns an INT, not VOID*. Sheesh.
    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.

  3. #3
    Banned
    Join Date
    Oct 2008
    Posts
    1,535
    solved it

  4. #4
    Registered User
    Join Date
    Aug 2005
    Location
    Austria
    Posts
    1,990
    fgetc returns an int. Your'e comparing with NULL ( a void * ).
    BTW what are you trying to do with that code ?
    Kurt

  5. #5
    Banned
    Join Date
    Oct 2008
    Posts
    1,535
    i am trying know in i reach EOF

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 10
    Last Post: 07-10-2008, 03:45 PM
  2. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  3. <Gulp>
    By kryptkat in forum Windows Programming
    Replies: 7
    Last Post: 01-14-2006, 01:03 PM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM