What could be causing this error?
Here is part of the program:
#include "stdafx.h"
#include <iostream>
#include <stdio.h>
#include <iomanip>
#include <cstdlib>
#include <conio.h>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
// Constants for menu choices
const int ADULT_CHOICE = 1,
CHILD_CHOICE = 2,
SENIOR_CHOICE = 3,
QUIT_CHOICE = 4;
// Constants for membership rates
const double ADULT = 40.0,
CHILD = 20.0,
SENIOR = 30.0,
// Variables
int choice; // Menu choice
int months; // Number of months
double charges; // Monthly Charges
This is the error I am getting:
error C2062: type 'int' unexpected
error C2065: 'choice' : undeclared identifier
error C2065: 'choice' : undeclared identifier
Any advice/suggestion is greatly appreciated.
Thank you very much!! It worked :)