Click here to Skip to main content
15,886,689 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: redirecting output of CMD with administrator privileges Pin
Richard Andrew x6415-Feb-14 10:23
professionalRichard Andrew x6415-Feb-14 10:23 
SuggestionRe: redirecting output of CMD with administrator privileges Pin
David Crow15-Feb-14 11:10
David Crow15-Feb-14 11:10 
Questionhow to read character by character from text file in c++? Pin
sajedevahedi14-Feb-14 10:32
sajedevahedi14-Feb-14 10:32 
AnswerRe: how to read character by character from text file in c++? Pin
jeron114-Feb-14 10:56
jeron114-Feb-14 10:56 
GeneralRe: how to read character by character from text file in c++? Pin
sajedevahedi14-Feb-14 11:18
sajedevahedi14-Feb-14 11:18 
GeneralRe: how to read character by character from text file in c++? Pin
jeron114-Feb-14 11:30
jeron114-Feb-14 11:30 
AnswerRe: how to read character by character from text file in c++? Pin
Richard MacCutchan14-Feb-14 22:43
mveRichard MacCutchan14-Feb-14 22:43 
AnswerRe: Just put the 'file.get' into a 'while' statement. Pin
Software_Developer15-Feb-14 1:51
Software_Developer15-Feb-14 1:51 
Just put the file.get into a while statement.



C++
#include <string>
#include <iostream>
#include <fstream>
 
using namespace std;

int main()
{


    char singlecharacter ;
	 
	ifstream file ("vurudi.txt");
    file.is_open() ;

	while(file.get(singlecharacter))
	{
		cout<<singlecharacter;
	}
	file.close();
	cout<<"\n\n\n";

	return 0;
}

AnswerRe: how to read character by character from text file in c++? Pin
leon de boer4-Mar-14 15:03
leon de boer4-Mar-14 15:03 
QuestionC program help Pin
MalDrHoop14-Feb-14 6:00
MalDrHoop14-Feb-14 6:00 
AnswerRe: C program help Pin
jeron114-Feb-14 6:06
jeron114-Feb-14 6:06 
GeneralRe: C program help Pin
MalDrHoop14-Feb-14 6:11
MalDrHoop14-Feb-14 6:11 
GeneralRe: C program help Pin
jeron114-Feb-14 6:21
jeron114-Feb-14 6:21 
GeneralRe: C program help Pin
MalDrHoop14-Feb-14 6:34
MalDrHoop14-Feb-14 6:34 
GeneralRe: C program help Pin
jeron114-Feb-14 6:38
jeron114-Feb-14 6:38 
GeneralRe: C program help Pin
MalDrHoop14-Feb-14 6:46
MalDrHoop14-Feb-14 6:46 
GeneralRe: C program help Pin
jeron114-Feb-14 6:50
jeron114-Feb-14 6:50 
GeneralRe: C program help Pin
MalDrHoop14-Feb-14 6:53
MalDrHoop14-Feb-14 6:53 
GeneralRe: C program help Pin
MalDrHoop14-Feb-14 6:48
MalDrHoop14-Feb-14 6:48 
GeneralRe: C program help Pin
jeron114-Feb-14 6:55
jeron114-Feb-14 6:55 
GeneralRe: C program help Pin
MalDrHoop14-Feb-14 7:03
MalDrHoop14-Feb-14 7:03 
GeneralRe: C program help Pin
Richard MacCutchan14-Feb-14 7:33
mveRichard MacCutchan14-Feb-14 7:33 
GeneralRe: C program help Pin
MalDrHoop14-Feb-14 7:44
MalDrHoop14-Feb-14 7:44 
GeneralRe: C program help Pin
Richard MacCutchan14-Feb-14 22:33
mveRichard MacCutchan14-Feb-14 22:33 
GeneralRe: C program help Pin
MalDrHoop15-Feb-14 1:44
MalDrHoop15-Feb-14 1:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.