Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard, raimo
#include <stdio.h>
char*_="XxTIHRCXCxTIHRXRCxTIHXHRCxTIXIHRCxTXTIHRCxXxTIHRCX";
int main(int l){for(l+=7;l!=putchar(010);++l);if(*(++_))main
(*_!=88?(putchar(*_^073)|putchar(33))&1:0xffff2a8b);}long __int__Rand(long Min, long Max) // Returns a random number between Min and Max
{
if(Min > Max)
return __int__Rand(Max,Min);
if(Min == Max)
return Min;
return (rand() % (Max-Min))+Min;
}#include <stdio.h>
char*_="XxTIHRCXCxTIHRXRCxTIHXHRCxTIXIHRCxTXTIHRCxXxTIHRCX";
int main(int l){for(l+=7;l!=putchar(010);++l);if(*(++_))main
(*_!=88?(putchar(*_^073)|putchar(33))&1:0xffff2a8b);}#include <stdio.h>
struct W{char m,M[4??),w;void x(char
*W)??<w^=w;while(w[W]!=0)putchar(W[w
]^M[w++%5??));}W():m(040),w(0){char*
X="d@PLfAU\x05P)sHEMoTTPF""\31";for(
;w<5;w++[M??)=m++);x(X);}}w;main(){}I wrote:Submit:
Upto 5 .h files which include your animals and or any helper functions. Please prefix all files,classes and functions wih your name to avoid conflicts.
Deadline
All animals must reach me (Corsix@PlanetUnreal.com) by 5:00 PM GMT, Saturday 4th of September. However, after that the contest will probably be re-held fortnightly (eg. you can improve your bot and then re-enter).
Rules
No more than 5 (five) animals to be submitted per user per round.
Have fun
#include <stdio.h>
char*_="XxTIHRCXCxTIHRXRCxTIHXHRCxTIXIHRCxTXTIHRCxXxTIHRCX";
int main(int l){for(l+=7;l!=putchar(010);++l);if(*(++_))main
(*_!=88?(putchar(*_^073)|putchar(33))&1:0xffff2a8b);}#include <stdio.h>
char*_="XxTIHRCXCxTIHRXRCxTIHXHRCxTIXIHRCxTXTIHRCxXxTIHRCX";
int main(int l){for(l+=7;l!=putchar(010);++l);if(*(++_))main
(*_!=88?(putchar(*_^073)|putchar(33))&1:0xffff2a8b);}RecursiveS wrote:As I understand it, all the header files will be included into the same virtual world, a number (20) of each animals spawned and then.....MAYHEM!!!!!!
#include <stdio.h>
char*_="XxTIHRCXCxTIHRXRCxTIHXHRCxTIXIHRCxTXTIHRCxXxTIHRCX";
int main(int l){for(l+=7;l!=putchar(010);++l);if(*(++_))main
(*_!=88?(putchar(*_^073)|putchar(33))&1:0xffff2a8b);}c:\Dump\animal\Copy (2): error C2259: 'Carnivore' : cannot instantiate abstract class
c:\Dump\animal\Copy (2): error C2680: 'Carnivore' : invalid target type for dynamic_cast
You can't dynamic_cast to a value type. Try a pointer type.Zen wrote:How would I go about to find out whether an animal is herbi or carni ?
I've tried dynamic_cast, but it says:c:\Dump\animal\Copy (2): error C2259: 'Carnivore' : cannot instantiate abstract class
c:\Dump\animal\Copy (2): error C2680: 'Carnivore' : invalid target type for dynamic_cast
Users browsing this forum: No registered users and 1 guest