Thread: error message

  1. #1
    Registered User deleeuw's Avatar
    Join Date
    Aug 2001
    Posts
    31

    Question error message

    hey all
    what does this message mean:

    passing `int' to argument 1 of `fputs(const char *, FILE *)' lacks a cast

    777

  2. #2
    Registered User Coder's Avatar
    Join Date
    Aug 2001
    Location
    Cairo, Egypt
    Posts
    128

    Smile

    It means that your passing the function an integer argument (of type int) when it expects a pointer to a constant character (a string).


    Code:
    FILE* pFile = fopen("filename.txt","wt");
    // fputs(5,pFile); This will give you the error
    fputs("5",pFile); // This is fine
    Muhammad Haggag

Popular pages Recent additions subscribe to a feed