たくさんのエラーが発生し続けます:
- 引数 1 の型エラー
 - 以前に宣言された「getStudentData」の再宣言
 - 「(不完全な) 構造体スタッドネット」の不明なフィールド「fname」。
 
どんなフィードバックでも感謝します。ありがとう
#include <stdio.h>
#include <stdlib.h>
struct student{
    char fname[21];
    char lname[21];
    float gpa;
} str;
int getStudentData(struct studnet *current_ptr); // struct function format 
int main(void){
    struct student str;
    getStudentData(str);
    printf("Last Name: %s\n First Name: %s\n GPA: %.2f\n", str.fname, str.lname, str.gpa);
    return 0;
}
int getStudentData(struct studnet *current_ptr){
    FILE *studentFile; // declaring a pointer file variable
    studentFile = fopen("StudnetData.txt", "r"); // format for fopen; file-variable = fopen(file_name, mode);
    if ( studentFile == NULL){ 
        printf("Error: Unable to open StudnetData.txt file\n"); //test for error
    }
    else {
        fscan(studentFile, "%20s %20s has a GPA of %f\n"
                , current_ptr->fname, current_ptr->lname, current_ptr->gpa);
        // fscanf(file, format, ¶meter-1, ...) 
        fclose(studentFile); // The function fclose will close the file. 
    }
    return 0;
}