名前を検索して、バイナリファイルにレコードが存在するかどうかを調べようとしています。
入力に関係なく「if」が返されるので、それが存在しないときに常に検出されるので、私は何かを正しく行っていないようです。
デバッガーに「if=式の構文エラー」と表示されますが、表示されません。
#ifndef DATA_PLAYER_H_INCLUDED
#define DATA_PLAYER_H_INCLUDED
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct Player
{
    char nome[50];
    int pontos;
}Players;
void ViewPont();
void SearchPont();
#endif // DATA_PLAYER_H_INCLUDED
-
#include "DATA_PLAYER.h"
void ViewPont()
{
    Players pl;
    FILE *fp;
    int i, pontos;
    fp = fopen("Pontuacoes.dat", "rb+");
        while((fread(&pl, sizeof(Players),1, fp)) != 0 )
    {
        printf("%s %d\n", pl.nome, pl.pontos);
    }
    fclose(fp);
}
void SearchPont()
{
    char nam[50];
    char ch;
    Players pl;
    FILE * fp;
    fp = fopen("Pontuacoes.dat","rb+");
    printf("\n nome das pont\n");
    fflush(stdout);
    scanf("%s", nam);
    printf("%s", nam);
    while((fread(&pl, sizeof(Players),1, fp)) != 0)
    {
        if((strcmp(pl.nome, nam))==0);
        {
            printf("\nregisto encontrado\n");
        }
    }
fclose(fp);
}