Code works in MS Visual C++, not in Dev-C++
I wrote some code that compiles just fine in MS Visual C++ at school, but I brought it home and Dev-C++ has a problem with it. I wrote my own header called phone.h, here's the code for it:
(I put the error message from the compiler with the corresponding lines, each one applies to the line that is directly below it)
Code:
//parse error before numeric constant
const int FALSE=0;
//parse error before numeric constant
const int TRUE=1;
const int LISTMAX=20;
const int NAMEMAX=30;
struct phoneNumber
{
char name[NAMEMAX];
int areaCode;
int exchange;
int number;
};
void menu();
void editList(phoneNumber[], int);
void printList(phoneNumber[], int);
void printMember(phoneNumber[], int);
int saveList(phoneNumber[], int, int, char*);
Here are my #include statements (once again, the error messages are in the comments, they pertain to the line directly below):
Code:
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cctype>
#include <string>
// In file included from phone.cpp
#include "phone.h"
using namespace std;
I doubt the problem is with the rest of the code, but if you think it might be, let me know and I'll post that too.
Any ideas are greatly appreciated. Thanks.