Ouvrir et lecture d'un fichier.txt en C++

widedtlig - 24 avril 2013 à 17:38
cptpingu Messages postés 3837 Date d'inscription dimanche 12 décembre 2004 Statut Modérateur Dernière intervention 28 mars 2023 - 24 avril 2013 à 19:54
bonjour, s'il vous-plait aidez moi comment je peux ouvrir et ecrire un ficier.txt en visual C++ 2010 j'ai commencer et voila,comment je peux afficher les contenues de fichier????????????





int _tmain(int argc, _TCHAR* argv[])
{

std::ifstream file("fichier.txt");
if (!file)
{
return 1; //if cannot find file, all of the time
}

char response,cin;
cin >> response;


return 0;
}

1 réponse

cptpingu Messages postés 3837 Date d'inscription dimanche 12 décembre 2004 Statut Modérateur Dernière intervention 28 mars 2023 123
24 avril 2013 à 19:54
Bonjour.

Regarde ici:
http://lmgtfy.com/?q=ouvrir+et+lecture+d%27un+fichier.txt+en+C%2B%2B

________________________________________________________________________
Historique de mes créations, et quelques articles:
[ http://0217021.free.fr/portfolio http://0217021.free.fr/portfolio]
Merci d'utiliser Réponse acceptée si un post répond à votre question
0
Rejoignez-nous