an error in my program

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pressure
    New Member
    • Apr 2010
    • 1

    #1

    an error in my program

    when i run my program it gives me this error
    line 36 : warning: assignemnt makes integer from pointer without cast


    printf("Has the item been returned? Y or N\n");
    scanf("%c",key) ;

    this is line 36 if (key = "N");
  • whodgson
    Contributor
    • Jan 2007
    • 542

    #2
    Do you mean........... . if(key=='N')?

    Comment

    • newb16
      Contributor
      • Jul 2008
      • 687

      #3
      btw, scanf("%c",key) ; will not work ( i.e. most likely crash).

      Comment

      • donbock
        Recognized Expert Top Contributor
        • Mar 2008
        • 2427

        #4
        Please provide the definition line for 'key'; that is, the statement that declares the type of that variable.

        Comment

        Working...