I get the following error:
----- Build started: Project: Program++, Configuration: Debug Win32 ------
Compiling...
Helloworld.cpp
Name.cpp
c:\parish\generic_pa_1\program++\program++\name.cp p(6) : error C2447: '{' : missing function header (old-style formal list?)
Generating Code...
Build log was saved at "file://c:\Parish\Generic_Pa_1\Program++\Program++\Debug\B uildLog.htm"
Program++ - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
When I tried compliling the following program on VC++2008:
#include<iostream>
#include<string>
{
using namespace std;
string s;
cout << "Please enter your first name followed by a newline\n";
cin >> s;
cout << "Hello, " << s << '\n';
return 0; /* this return statement isn't necessary */
}
Please help.