Janiper
2008-02-25 16:46:08 UTC
I dont know how to use delete command
there is a line that has a name of "how to use delete command" and i wanted to put the delete command inorder the program will work
can someone teach me how to use delete command
#include
#include
#include
#include
struct student
{
char name[30];
}stud[5];
void main()
{
int i,j,cmp;
clrscr();
for(i=1;i<=3;i++)
{
printf("Enter name :");
gets(stud[i].name);
j=0;
do
{
cmp = strcmp(stud[i].name , stud[j].name);
j++;
if(cmp == 0)
{
printf("The record #%d will be deleted",i );
"how to use delete command"
j=1;
}
}while(j }clrscr();
{
gotoxy(10,2);
printf("Name");
for(i=1;i<=3;i++)
{
clrscr();
gotoxy(10,3+i);
printf("%s",stud[i].name);
}
getch();
}
}