#pragma hdrstop
#pragma argsused

#include <tchar.h>
#include <stdio.h>
#include <iostream.h>
#include <algorithm>
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
  char s[]="Hello World!";
  int Uppercase = 0; //modified by the lambda
  for_each(s, s+sizeof(s), [&Uppercase] (char c) {
	if (isupper(c))
	  Uppercase++;
  });
  cout<< Uppercase<<" uppercase letters in: "<< s<<endl;
  cin.get();

  return 0;
}
