unbuffered output need, not working

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>
#include <conio.h>

using namespace std;

int main(){
	
	char c;
	
	while(c != '\n'){
		
		c = getchar();
		putchar(c);
		
	}//-------while
	
}//--------main() 


I need my code to echo the character as it is input like:

wwhhaatt iiss tthhiiss
I really can't think of an easy way to do this using standard C++. You could probably do this using your OS's API, but what I'm thinking would be fairly involved for a beginner.
woops my google research too makes me realize the truthfulness of this string "There's no standard way of doing it" which I read on many pages

BUT why can't I stop input stream as soon as it take a character???
Topic archived. No new replies allowed.