Expected primary-expression before"char"

Date class with member functions
Any help would be appreciated.
A few of my errors

C:\Dev-Cpp\Templates\Date2.0.cpp In function `int main()':
18 C:\Dev-Cpp\Templates\Date2.0.cpp expected primary-expression before "char"
18 C:\Dev-Cpp\Templates\Date2.0.cpp expected `;' before "char"
23 C:\Dev-Cpp\Templates\Date2.0.cpp expected primary-expression before "char"
23 C:\Dev-Cpp\Templates\Date2.0.cpp expected `;' before "char"
Part of my code

// This program demonstrates the Date class.
#include <iostream>
#include <cctype>
#include <iomanip>
using namespace std;

// Function prototypes
void displayMenu();


int main()
{
char choice; //Menu Selection
int dd, mm, yy, yyyy;

// Display the menu and get a valid selection.
displayMenu();
cin >> char choice;
while (toupper(choice) < '1' || toupper(choice) > '4')
{
cout << "Please choose a date format "
<< "of 1, 2, 3, 4:";
cin >> char choice;
}

// Process the user's menu selection.
switch(choice)
{
case '1': cout << "00/00/00";
break;
case '2': cout << "Month 00, 0000 ";
break;
case '3': cout << "00 Month, 0000";
break;
case '4': cout << "End Program
}
} while (touper(choice) != '4');

do
{
if (choice = 1)
cout<< "Enter the Month\n";
cin>> mm;
do
{
if (mm < 1)
if (mm > 12)
cout<<"ERROR INVALID \n";

cout<< "Enter the Day\n";
cin>> dd;
do
{
if (dd < 1)
if (dd > 31)
cout<<"ERROR INVALID \n";

cout<< "Enter the Year\n";
cin>> yy;

cout<<mm<<'/'<<dd<<'/'yy<<";
do
{
if (choice = 2)
cout<< "Enter the Month\n";
cin>> mm;
do
{
if (mm = 1)
return January
if (mm = 2)
return February
if (mm = 3)
return March
if (mm = 4)
return April
if (mm = 5)
return May
if (mm = 6)
return June
if (mm = 7)
return July
if (mm = 8)
return August
if (mm = 9)
return September
if (mm = 10)
return October
if (mm = 11)
return November
if (mm = 12)
return December
do
{
if
cout<< "Enter the Day\n";
cin>> dd;
do
{
if (dd < 1)
if (dd > 31)
cout<<"ERROR INVALID \n";

cout<< "Enter the Year\n;
cin>> yy;
cin >> char choice; should be cin >> choice;
I really appreciate the help Peter87
Please don't spam, you posted the same topic in this forum and the General C++. Post in one forum only.
Ok. Will not happen again.
Topic archived. No new replies allowed.