what this worning mean?

This is a discussion on what this worning mean? within the C Programming forums, part of the General Programming Boards category; i get this warning |227|warning: passing arg 1 of `unCover' makes pointer from integer without a cast| on this line ...

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

    what this worning mean?

    i get this warning
    |227|warning: passing arg 1 of `unCover' makes pointer from integer without a cast|

    on this line
    Code:
    kent=unCover(board[N][N],size,x_rem,y_rem);
    what is the problem??

  2. #2
    ZuK
    ZuK is offline
    Registered User
    Join Date
    Aug 2005
    Location
    Austria
    Posts
    1,990
    unCover expects a pointer as 1st Argument, you are passing an int.
    Kurt

  3. #3
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,553
    Plus, this is really an error, so don't you go and ignore it.
    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.

  4. #4
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,302
    Remove one or both of the [N] bits, depending on the definition of unCover. You just want to pass the array, not reference an out of bounds item and pretend the value written in that memory location is a pointer (assuming it doesn't crash immediately).
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  5. #5
    Registered User
    Join Date
    Oct 2008
    Location
    TX
    Posts
    2,047
    Post the definition of unCover() as that will help in resolving the issue.

Popular pages Recent additions subscribe to a feed

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