Problème et AVC : _wfopen_s
J'ai fait un AVC. Avant, j'étais ingénieur en informatique système. Maintenant je suis aphasique.
Problème :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
int Cinema::afficher_Titre_1(wstring t)
{ // Titre 1
if (t == L"")
return 0;
FILE* fichier;
errno_t err;
if (Titre == t)
{
t = t + (L".txt");
err = _wfopen_s(&fichier, t, L"r");
}
else if (t == Titre + L" - " + Sous_Titre)
{
t = t + L" - " + Sous_Titre + L".txt";
err = _wfopen_s(&fichier, t, L"r");
}
else
{
wcout << L"Titre et/ou Sous Titre : érreur !" << endl;
return -1;
}
if (err != NULL)
{
wcerr << L"Le fichier '*.txt' a été nnnnnnnn !\n" << endl;
return 1;
}
wchar_t phrase[CINEMA];
Titre_1 = L'';
while (!feof(fichier))
{
fgetws(phrase, 512, fichier);
if (ferror(fichier))
{
perror("Read error");
break;
}
Titre_1 = Titre_1 + phrase;
}
fclose(fichier);
return 0;
} |
_wfopen_s : Help !!!
Code:
1 2 3 4 5 6
|
Gravité Code Description Projet Fichier Ligne État de la suppression
Erreur (active) E0413 il n'existe aucune fonction de conversion appropriée de "std::wstring" en "const wchar_t *" You D:\Work\Prg\CPP\You\cinema.cpp 399
Gravité Code Description Projet Fichier Ligne État de la suppression
Erreur (active) E0413 il n'existe aucune fonction de conversion appropriée de "std::wstring" en "const wchar_t *" You D:\Work\Prg\CPP\You\cinema.cpp 404 |