mga bro..!! PATAY na ko hapit,.
gpabuhat na pud mi ug database about sa profile sa student.,
tagae ko ninyo ug clue mga bro..,,
HUHUHUHU![]()
mga bro..!! PATAY na ko hapit,.
gpabuhat na pud mi ug database about sa profile sa student.,
tagae ko ninyo ug clue mga bro..,,
HUHUHUHU![]()
study lng sa mga basic SQL commands bai like SELECT, UPDATE, DELETE, INSERT, CREATE TABLE.. dali ra na..
SQL Introduction
mysql inyo gamit?
c++ man bro..
programming,. tagae ko ninyo ug clue...
study advance in Struct, reading and writing files... learning to write functions, and forget about pointers this time.
in ani?
HTML Code:#include<iostream.h> #include<conio.h> #include<string.h> #include<stdio.h> #include<stdlib.h> #include<dos.h> class student { private: int id; char name[50]; double tel; public: student () { id=0; strcpy(name,""); tel=0; } void input() { cout<<" Enter The Name "; gets(name); cout<<endl; cout<<" Enter The Telephone "; cin>>tel; } void output() { gotoxy(6,2); cout<<" The ID is " <<id<<endl; cout<<endl; cout<<" The Name is " <<name<<endl; cout<<endl; cout<<" The Telephone is "<<tel<<endl; } int getid() { return id; } void setid(int ide) { id=ide; } void setname(char naam[50]) { strcpy(name,naam); } void student::view(int y) { gotoxy(6,2); cout<<"----ID----"; gotoxy(35,2); cout<<"----Name----"; gotoxy(63,2); cout<<"----Telephone----"; gotoxy(10,y); cout<<id; gotoxy(39,y); cout<<name; gotoxy(69,y); cout<<tel; } };student st[10]; void main() { clrscr(); int kamal=0; int start; int start2; _setcursortype(_NOCURSOR); start: gotoxy(30,9); cout<<" Add A Record "; gotoxy(30,10); cout<<" Search A Record "; gotoxy(30,11); cout<<" Delete A Record "; gotoxy(30,12); cout<<" Update A Record "; gotoxy(30,13); cout<<" View All Records "; int y=9; char key; gotoxy(28,y); cout<<"¯"; do { key =getch(); if(key==80 && y!=13) { gotoxy(28,y); cout<<" "; y++; gotoxy(28,y); cout<<"¯"; } else if(key==72 && y!=9) { gotoxy(28,y); cout<<" "; y--; gotoxy(28,y); cout<<"¯"; } else if(key==13 && y==9) { clrscr(); int id; int x=0; start2: clrscr(); cout<<"Enter the id "; cin>>id; cout<<endl; for(int c=0;c<10;c++) { if(st[c].getid()==id) { cout<<"This id already exists "; x=1; getch(); clrscr(); goto start2; } } if (x==0) { st[kamal].setid(id); st[kamal++].input(); } getch(); clrscr(); goto start; } else if(key==13 && y==10) { clrscr(); int ID; cout<<"Enter the ID "; cin>>ID; int x=0; for(int j=0;j<=10;j++) { if(st[j].getid()!=0) { if(st[j].getid()==ID) { st[j].output(); x=1; } } } if(x==0) { cout<<"record not found "; } getch(); clrscr(); goto start; } else if (key==13 && y==11) { int ID; int x=0; clrscr(); cout<<"Enter the id "; cin>>ID; for(int i=0;i<10;i++) { if(st[i].getid()==ID) { st[i].setid(0); x=1; cout<<"Record has been deleted "; } } if(x==0) { cout<<"yeah record to hay hi naheen tu nay apna sirr delete karna hay kiya "; } getch(); clrscr(); goto start; } else if(key==13 && y==12) { clrscr(); int ID; cout<<"Enter the ID "; cin>>ID; int x=0; for(int j=0;j<=10;j++) { if(st[j].getid()!=0) { if(st[j].getid()==ID) { st[j].output(); x=1; char nname[50]; cout<<"Enter the new name "; gets(nname); st[j].setname(nname); cout<<endl; cout<<"record updated successfully "; } } } if(x==0) { cout<<"record not found "; } getch(); clrscr(); goto start; } else if(key==13 && y==13) { clrscr(); int y=3; for(int i=0;i<kamal;i++) { if(st[i].getid()!=0) { st[i].view(y); y++; } } getch(); clrscr(); goto start; } else if(key==27) { exit(0); } }while(1); }
Last edited by bryanarzaga; 09-15-2008 at 10:28 PM.
@bryanarzaga,
wrap your code![]()
bro ano compiler mo?
bordogoy, c language man ato gigamit, dli mn c++..![]()
Similar Threads |
|