how can i read character by character from a text file
using isrteam.

i use :
istream s;
char *next;
next=new char;"example.txt");,1);

but this gives me each character with some dummy symbol.

char ch = 0;
//read file character by character
while(file && file.get(ch) ){
 cout << ch;

but what is problem in my code?
i saw it on net

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.