Basic Winsock Usage
This code is probably not the best for learning from, however I decided to post it in the hope that maybe it could help someone figure out the extreme basics of using the winsock control. Basicly, I wrote this to play a prank on a friend, you know just scare him a bit, but after using it I decided to go ahead and submit it, hoping maybe it would help someone out with winsock. I will say right now I don't highly expect it to be of to much use, but I hope it is. If you find you can't learn anything from it, or don't understand it, don't critisize automaticly, email me at [email protected] and I will happily help you in any way possible. I just hope it is of some use to some people, but don't use it for anything bad, just try to learn from it. Thanks.
สรุปโดย AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Upload
//Bu Program Ýsim,Adres ve Bilet sayýsýný
//alarak Link list yapýsýyla kaydeder ve Listeler
#include <stdlib.h>
#include <iostream.h>
struct LinkList
{
char name[20];
char adress[50];
int NumTickets;
LinkList *ptrnext;
};
void yeniKayit();
void listele();
LinkList *ptrfirst, *ptrthis, *ptrnew, *ptrlast;
void main()
{
int ch;
ptrfirst = ptrthis = ptrnew = ptrlast = NULL;
cout<<"Seciminizi Yapiniz !!!\n!!!Isim ve Adreste BOSLUK(SPACE) Kullanmayiniz!!!\n";
cout<< "\nYeni Kayit icin (1)";
cout<< "\nListelemek icin (2)";
cout<< "\nCikmak icin (55) giriniz";
cout<<"\n SECIMINIZ ? = ";
cin>>ch;
while(ch!= 55)
{
switch(ch)
{
case 1:
yeniKayit();
break;
case 2:
listele();
break;
case 55:
cout<<"Programdan Ciktiniz!!";
exit(0);
default : cout<<"\n !! Yanlis Secim !!";
}
cout<< "\nYeni Kayit icin (1)";
cout<< "\nListelemek icin (2)";
cout<< "\nCikmak icin (55) giriniz";
cout<<"\n SECIMINIZ ? = ";
cin>>ch;
}
}
void yeniKayit()
{
ptrnew = new LinkList;
if(ptrfirst==NULL)
ptrfirst = ptrlast = ptrnew;
else
{
ptrlast->ptrnext = ptrnew;
ptrlast = ptrnew;
}
cout<<"\nAdinizi Giriniz: ";cin >>ptrlast->name;
cout<<"\nAdresiniz: ";cin >>ptrlast->adress;
cout<<"\nBilet Sayisi Giriniz: ";cin >>ptrlast->NumTickets;
ptrlast->ptrnext=NULL;
}
void listele()
{
if(ptrfirst == NULL)
cout<<"\nListe Bos!!\n";
else
{
ptrthis=ptrfirst;
do
{
cout<<"\nAd: "<<ptrthis->name
<<"\nAdres : "<<ptrthis->adress
<<"\nBilet Sayisi: "<<ptrthis->NumTickets;
ptrthis = ptrthis->ptrnext;
}
while (ptrthis != NULL);
}
}