C: a value of type "int" cannot be used to initialize an entity of type "const char *" : Good evening! I am attempting to write my own c code to read some pgm version 5 images I have exported from GIMP. I am trying to compile with the nvcc compiler on an Ubuntu machine, but it is giving me the following error: 
    
    error: a value of type "int" cannot be used to initialize an entity of type "const char *"
Which refers to this line:

    char const* magicNumber = fscanf(inputPGM, "s");

But based upon what I read [here][1], fscanf() should spit out a string (or actually a pointer to one) when given those arguments. Does fscanf() vary between platforms? Is there some cool pointer nonsense that I am misusing?

    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <limits.h>
    int** readPGM(char* filename, int* numCols, int* numRows){
        FILE *inputPGM;
        inputPGM = fopen(filename, "r");
        //read magic number
        char const* magicNumber = fscanf(inputPGM, "s");
        //skip commented line
        fscanf(inputPGM,"s");
        //read width and height
        int width = fscanf(inputPGM, "s");
        int height = fscanf(inputPGM, "s");

        return NULL;
        } 

    int main(){
        static char filename[] = "sample.pgm";
        int* numCols = (int*)malloc(sizeof(int));
        int* numRows = (int*)malloc(sizeof(int));
        int** data = readPGM(filename, numCols, numRows);
        printf("Done!\n");
        free(numCols);
        free(numRows);
        return 0;
        }


  [1]: https://www.tutorialspoint.com/c_standard_library/c_function_fscanf.htm