Hi Every Body
I am new born in C++ I am facing and error for last 3 days I tried my best with all what I knew but FAILED.....
Error is -
" Linker Error: Undefined Symbol Library::code in module PRGDONE.CPP"
I am using Turbo C++ 3.0 of Borland
Here is the code -
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
#include<process.h>
#include<stdio.h>
#include<stdlib.h>
class library
{
int sum,total,choice ,no;
static int code,a,c,p,m,d,e,h,f,z;
public:
void text()
{
while(no<121||no>125)
{
cout<<"\n enter the card no.between(121 to 125):";
cin>>no;
if(no<121||no>125)
{
cout<<"\n incorrect no.";
cout<<"\n enter the card no. again:";
}
else
{
break;
}
}
}
void text1()
{
cout<<"\n\n"<<setw(39)<<" ------------ ";
cout<<"\n\n"<<setw(39)<<" | LIBRARY | ";
cout<<"\n\n"<<setw(39)<<" ------------ ";
cout<<"\n\n\n"<<"1 BOOKS";
cout<<"\n"<<"2 GET";
cout<<"\n"<<"3 EXIST";
cout<<"\n\n ENTER YOUR CHOICE::";
cin>>choice;
switch (choice)
{
case 1: cout<<"\n BOOKS DETAIL";
cout<<"\n BOOK NAME CODE QUANTITY";
cout<<"\n chemistry 1001 5";
cout<<"\n panipath war 1002 5";
cout<<"\n maths 1003 5";
cout<<"\n develop personality 1004 5";
cout<<"\n Computer advance 1005 5";
cout<<"\n how to learn 1006 5";
cout<<"\n Phycs today 1007 5";
break;
case 2: cout<<"\n BOOK AVAILABLE\n";
total=35;
cout<<" TOTAL BOOK THAT CAN BE ISSUED:";
cout<<total<<endl;
break;
case 3: break;
default: cout<<"\n YOU HAVE ENTERED WRONG VALUE";
}
}
static void work()
{
while(code<1001 ||code>1007)
{
cout<<"\n ENTER THE CODE BETWEEN (1001 TO 1007)";
cin>>code;
if (code<1001 || code>1007)
{
cout<<"INVALID CODE(book not available)";
}
else
{
switch(code)
{
case 1001:
for(c=1;c<=5;c++)
{
cout<<"\nbook available of code 1001:"<<c;
}
break;
case 1002:
for(p=1;p<=5;p++)
{
cout<<"\n book available of code 1002:"<<p;
}
break;
case 1003:
for(m=1;m<=5;m++)
{
cout<<"\n book available of code 1003:"<<m;
}
break;
case 1004:
for(d=1;d<=5;d++)
{
cout<<"\n book available of code 1004:"<<d;
}
break;
case 1005:
for(e=1;e<=5;e++)
{
cout<<"\n book available of code 1005:"<<e;
}
break;
case 1006:
for(h=1;h<=5;h++)
{
cout<<"\n book available of code 1006 :"<<h; }
break;
case 1007:
for(f=1;f<=5;f++)
{
cout<<"\n book available of code 1007:"<<f;
}
break;
}
for(z=1;z<=5;z++)
{
cout<<"\n card holder issued book"<<z;
}
for(a=1;a>=35;a--)
{
cout<<"\ntotal no.of books available"<<a;
}
}
}
}
};
int library::a=0;
int library::c=0;
int library::p=0;
int library::m=0;
int library::d=0;
int library::h=0;
int library::f=0;
int library::z=0;
int library::e=0;
void main()
{
clrscr();
library l1;
l1.text();
l1.text1();
library::work();
getch();
}
Please some body help me in removing this error....
Tnak you every body in Advance...........