Armenian Knowledge Base  

Go Back   Armenian Knowledge Base > General Discussions > Fun
Register

Reply
 
LinkBack Thread Tools
Old 21.08.2002, 22:10   #1
Kooper
 
Kooper_26's Avatar
 
Join Date: 05 2002
Location: Hay.am Portal
Age: 41
Posts: 350
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Post Programma Sovrasheniya :)

main()
{
she = alloc_first_she(nice, pretty, tall, smart, rich);
while (!dead(me))
{
....
if ( she->love != me )
{
free(she);
she = alloc_new_she(--nice, --pretty, --tall,
--smart, --rich);
}
else
{
f...ck(she);
new_she = alloc_new_she(++nice, ++pretty,
++tall, ++smart, ++rich);
if( new_she && new_she->love == me )
{
free(she);
she = new_she;
}
else
{
free(new_she);
nice--;
pretty--;
tall--;
smart--;
reach--;
}
}
....
}
free(me);
return 0;
}
__________________
---
RGRDS
http://www.hay.am Web Administrator
Reply With Quote
Old 21.08.2002, 22:43   #2
Moderator
 
Gates's Avatar
 
Join Date: 02 2002
Location: Armenia
Age: 37
Posts: 5,226
Downloads: 0
Uploads: 0
Reputation: 262 | 5
Thumbs up

A ti kompilirovat' proboval?
Reply With Quote
Old 22.08.2002, 04:47   #3
ЙЦУКЕН
 
Join Date: 07 2002
Location: 0x68,0x69,0x72, 0x69,0x6e,0x67, 0x20,0x6e,0x6f, 0x77
Age: 47
Posts: 3,118
Downloads: 0
Uploads: 0
Reputation: 5 | 0
Post

Ненадежная программа, блин

после alloc-а любого указателя надо проверять его на NULL
Reply With Quote
Sponsored Links
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 12:51.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.