tarun
October 21st, 2005, 12:12 PM
Someone I know has this trouble with the program (code below):
I am getting the following error
Call of nonfunction
in the line
SET_MODE(TEXT_MODE);
#include<stdio.h>
#include<iostream.h>
#include<dos.h>
#include<conio.h>
#include<graphics.h>
#include<fstream.h>
#include<process.h>
#include<mem.h>
#define o outtextxy
#define s setcolor
#define se setfillstyle
#define SET_MODE 0x00
#define TEXT_MODE 0x03
/* PERSONAL TELEPHONE DIRECTORY
IN BORLAND C++ 3.1
BY
ABHISHEK DEY DAS */
void addy()
{
//Function that adds new records
SET_MODE(TEXT_MODE);
clrscr();
char name[99];
char htele[30];
char otele[30];
char mtele[30];
char ftele[30];
char addy[999];
char email[20];
cout<<"Enter name: ";
gets(name);
cout<<"Enter address: ";
gets(addy);
cout<<"Enter home telephone number: ";
gets(htele);
cout<<"Enter office telephone number: ";
gets(otele);
cout<<"Enter mobile number: ";
gets(mtele);
cout<<"Enter FAX number: ";
gets(ftele);
cout<<"Enter email ID: ";
gets(email);
};
void eddy()
{
//Function that edits existing records
};
void del()
{
//Function that delets desired records
};
void sea()
{
//Function that searches for records
};
void exp()
{
//Function that exports records
};
void men()
{
//Initialising the graphics screen
int gd=DETECT,gm,maxx,maxy,j,m,i,x=600,y=450;
initgraph(&gd,&gm,"d:\\tc\\bgi");
//Variable declarations
char men1;
maxx=getmaxx();
maxy=getmaxy();
//Printing out the main menu screen
s(MAGENTA);
rectangle(20,20,625,450);
settextstyle(1,HORIZ_DIR,2);
s(2);
o(130,150,"PERSONAL TELEPHONE DIRECTORY");
sound(700);
delay(400);
nosound();
s(CYAN);
settextstyle(3,HORIZ_DIR,2);
o(140,200,"Hit 1 to add new records");
o(140,220,"Hit 2 to edit records");
o(140,240,"Hit 3 to delete records");
o(140,260,"Hit 4 to search for records");
o(140,280,"Hit 5 to export records");
o(140,300,"Hit 6 to exit");
men1=getch();
if (men1=='1')
{ addy(); }
else if (men1=='2')
{ eddy(); }
else if (men1=='3')
{ del(); }
else if (men1=='4')
{ sea(); }
else if (men1=='5')
{ exp(); }
else
{ exit(1); }
};
void main()
{
clrscr();
men();
};
Can anyone help?
I am getting the following error
Call of nonfunction
in the line
SET_MODE(TEXT_MODE);
#include<stdio.h>
#include<iostream.h>
#include<dos.h>
#include<conio.h>
#include<graphics.h>
#include<fstream.h>
#include<process.h>
#include<mem.h>
#define o outtextxy
#define s setcolor
#define se setfillstyle
#define SET_MODE 0x00
#define TEXT_MODE 0x03
/* PERSONAL TELEPHONE DIRECTORY
IN BORLAND C++ 3.1
BY
ABHISHEK DEY DAS */
void addy()
{
//Function that adds new records
SET_MODE(TEXT_MODE);
clrscr();
char name[99];
char htele[30];
char otele[30];
char mtele[30];
char ftele[30];
char addy[999];
char email[20];
cout<<"Enter name: ";
gets(name);
cout<<"Enter address: ";
gets(addy);
cout<<"Enter home telephone number: ";
gets(htele);
cout<<"Enter office telephone number: ";
gets(otele);
cout<<"Enter mobile number: ";
gets(mtele);
cout<<"Enter FAX number: ";
gets(ftele);
cout<<"Enter email ID: ";
gets(email);
};
void eddy()
{
//Function that edits existing records
};
void del()
{
//Function that delets desired records
};
void sea()
{
//Function that searches for records
};
void exp()
{
//Function that exports records
};
void men()
{
//Initialising the graphics screen
int gd=DETECT,gm,maxx,maxy,j,m,i,x=600,y=450;
initgraph(&gd,&gm,"d:\\tc\\bgi");
//Variable declarations
char men1;
maxx=getmaxx();
maxy=getmaxy();
//Printing out the main menu screen
s(MAGENTA);
rectangle(20,20,625,450);
settextstyle(1,HORIZ_DIR,2);
s(2);
o(130,150,"PERSONAL TELEPHONE DIRECTORY");
sound(700);
delay(400);
nosound();
s(CYAN);
settextstyle(3,HORIZ_DIR,2);
o(140,200,"Hit 1 to add new records");
o(140,220,"Hit 2 to edit records");
o(140,240,"Hit 3 to delete records");
o(140,260,"Hit 4 to search for records");
o(140,280,"Hit 5 to export records");
o(140,300,"Hit 6 to exit");
men1=getch();
if (men1=='1')
{ addy(); }
else if (men1=='2')
{ eddy(); }
else if (men1=='3')
{ del(); }
else if (men1=='4')
{ sea(); }
else if (men1=='5')
{ exp(); }
else
{ exit(1); }
};
void main()
{
clrscr();
men();
};
Can anyone help?
