SlideShare a Scribd company logo
1 of 1
Tránh trôi câu lệnh nhập sử dụng biến kiểu char[]

Fflush(stdin);



Tránh trôi câu lệnh nhập trong nhập xuất file:

Ifstream fin;

Fin.get();



Đẩy dữ liệu từ buffer xuống file:

Ofstream fout;

Fout.flush();

More Related Content

Viewers also liked (15)

Articulos de acceso controlado
Articulos de acceso controladoArticulos de acceso controlado
Articulos de acceso controlado
 
Semana 12
Semana 12Semana 12
Semana 12
 
Vulkanutbrott kopia
Vulkanutbrott kopiaVulkanutbrott kopia
Vulkanutbrott kopia
 
презентация1
презентация1презентация1
презентация1
 
Norsah
NorsahNorsah
Norsah
 
1928 bar
1928 bar1928 bar
1928 bar
 
Esterilizador de Teléfonos Móviles
Esterilizador de Teléfonos MóvilesEsterilizador de Teléfonos Móviles
Esterilizador de Teléfonos Móviles
 
Qué es una página web
Qué es una página webQué es una página web
Qué es una página web
 
Windenergie
WindenergieWindenergie
Windenergie
 
Resultats oficials trofeu primavera 2012 fak
Resultats oficials trofeu primavera 2012 fakResultats oficials trofeu primavera 2012 fak
Resultats oficials trofeu primavera 2012 fak
 
Percurso Cultural
Percurso CulturalPercurso Cultural
Percurso Cultural
 
Payers likely to throw up hurdles to Pfizer\'s new RA drug
Payers likely to throw up hurdles to Pfizer\'s new RA drugPayers likely to throw up hurdles to Pfizer\'s new RA drug
Payers likely to throw up hurdles to Pfizer\'s new RA drug
 
Orfis
OrfisOrfis
Orfis
 
Lenguaje y control del estrés
Lenguaje y control del estrésLenguaje y control del estrés
Lenguaje y control del estrés
 
Enigme12
Enigme12Enigme12
Enigme12
 

More from ptquang160492

More from ptquang160492 (12)

Thu vien lap trinh c++
Thu vien lap trinh c++Thu vien lap trinh c++
Thu vien lap trinh c++
 
Phong cach lap trinh c++
Phong cach lap trinh c++Phong cach lap trinh c++
Phong cach lap trinh c++
 
Ky thuat lap trinh
Ky thuat lap trinhKy thuat lap trinh
Ky thuat lap trinh
 
Ky thuat lap trinh c++
Ky thuat lap trinh c++Ky thuat lap trinh c++
Ky thuat lap trinh c++
 
String c++
String c++String c++
String c++
 
nhập xuất file 2 c++
nhập xuất file 2 c++nhập xuất file 2 c++
nhập xuất file 2 c++
 
chuỗi ký tự c++
chuỗi ký tự c++chuỗi ký tự c++
chuỗi ký tự c++
 
Nmlt c20 tap_tin
Nmlt c20 tap_tinNmlt c20 tap_tin
Nmlt c20 tap_tin
 
Bt subnetmask 3
Bt subnetmask 3Bt subnetmask 3
Bt subnetmask 3
 
Bt subnetmask 1
Bt subnetmask 1Bt subnetmask 1
Bt subnetmask 1
 
Chia subnetmask
Chia subnetmaskChia subnetmask
Chia subnetmask
 
Nhap chuoi co khoang trang
Nhap chuoi co khoang trangNhap chuoi co khoang trang
Nhap chuoi co khoang trang
 

Tranh troi cau lenh nhap

  • 1. Tránh trôi câu lệnh nhập sử dụng biến kiểu char[] Fflush(stdin); Tránh trôi câu lệnh nhập trong nhập xuất file: Ifstream fin; Fin.get(); Đẩy dữ liệu từ buffer xuống file: Ofstream fout; Fout.flush();