Code:
#include "stdafx.h"
#include <cstdio>

using namespace System;

int main(array<System::String ^> ^args)
{
    int c, nl;
	

	nl = 0;
	while ((c = getchar()) != EOF) 
		if(c == ' ')
			nl++;
			

		printf("The number of blanks is %d\n", nl);
	

    return 0;
}
I'm trying to count the number of blank (" ") spaces from user input using getchar(), then outputting the value using printf. But no output is done after I put in characters into the program. Any suggestions?