Go Back   Armenian Knowledge Base > General Discussions > Fun

Reply
 
Thread Tools

Programma Sovrasheniya :)
Old 21.08.2002, 21:10   #1
Kooper
 
Kooper_26's Avatar
 
Join Date: 05 2002
Location: Hay.am Portal
Age: 48
Posts: 350
Rep Power: 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

Old 21.08.2002, 21:43   #2
Moderator
 
Gates's Avatar
 
Join Date: 02 2002
Location: Armenia
Age: 45
Posts: 5,226
Rep Power: 6
Thumbs up

A ti kompilirovat' proboval?

Old 22.08.2002, 03:47   #3
nm
ЙЦУКЕН
 
Join Date: 07 2002
Location: 0x68,0x69,0x72, 0x69,0x6e,0x67, 0x20,0x6e,0x6f, 0x77
Age: 55
Posts: 3,118
Rep Power: 0
Post

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

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




Реклама:
реклама
Buy text link .

All times are GMT. The time now is 12:18.
Top

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