View Full Version: Gimi A Cookie! Lol.

C++ Game Dev > C++ Game Creations > Gimi A Cookie! Lol.


Title: Gimi A Cookie! Lol.
Description: Warning: contains offensive launguage!!!


Captn'Red - February 3, 2006 01:54 AM (GMT)
Ok, i made this for practice.... i can use char but i dont want to.......
i made this with perl but then i converted it to c++
(but i only used four lines of code for it!!! :P )
It should compile under Dev-C++..... enjoy!

CODE
/****************************************************
* GiMeACookie by Red* Converted from Perl to C++ by-*
* ------------------* Red..... Yes, i have used perl*
* Lol, download-----* ..............................*
* skulltag and play-*********************************
* me online!!!!-----*
********************/
#include <iostream>
#include <string>
using namespace std;
//Include stuff. lol.

int main()//Here is the main program
{
   string cookie;
   cout << "Gimmie a cookie!!! " <<endl;
   cin >> cookie;
   if (cookie == "cookie" or
   cookie == "Cookie"
   or cookie == "COOKIE"
   or cookie == "HERESYOURFUCKINCOOKIE!!!"
   or cookie == "biscute")
   {
              cout << "Mmmmmmmm..... Coooookiiieeeee! " <<endl;
              system("pause");
              return 0;
   }
   else
   {
              system("cls");
              cout << "Gimie a fucking cookie!!!! " <<endl;
              system("pause");
              return 0;
   }
}
//And heres the end. looooooooooooooooooooooooool...............


Cool eh? might make it a bit more advance by using char instead of string......

Captn'Red:lol:

BGamed - February 3, 2006 03:55 PM (GMT)
lol....

maybe make it some more advanced as you said...

Rocode - March 23, 2006 06:56 PM (GMT)
Haha funny program, but not so advanced :P
oh this is my first post here on this forum!

BGamed - March 25, 2006 11:05 PM (GMT)
I suggest to post some more :D

gamehawk - March 26, 2006 01:57 AM (GMT)
Welcome to the board, do you know C++?

BGamed - March 26, 2006 07:42 AM (GMT)
I hope it isn't the type that only registers, to post about one or two messages,

hopefully he'l post some more! :D

but em, lets go back to the topic of Captn'Red! :rolleyes:

Neken - May 16, 2006 01:44 PM (GMT)
nobody tried your program .. since there are "or" keywords that doesnt even exist in c++ ...

netman - May 18, 2006 08:09 PM (GMT)
@Neken

I believe the word 'or' isn't in the CPP specification either, but still some compilers support it.
I can compile it fully in Dev-c++

Neken - May 18, 2006 08:11 PM (GMT)
holy shite !

thanks for telling me ... it's SOOO not standard though :P

BGamed - May 20, 2006 08:10 AM (GMT)
Is there an alternate way to do this instead of using 'or' ?

I'd like to know that, cuase it is decently quite handy... :o

netman - May 20, 2006 02:10 PM (GMT)
you have to ways, a bitwise and a logical one.
bitwise or: |
logical or: ||
bitwise and: &
logical and: &&
bitwise xor: ^
logical xor: ^^

atleast if my memory correct, and I still can't find out what is the difference between bitwise and logical one tho, I simply use logical everytime.

BGamed - May 20, 2006 07:47 PM (GMT)
ok thanks, neither I don't know the difference <_< :P

but em, what does 'xor' means? :blink:

Neken - May 20, 2006 11:26 PM (GMT)
it's an exclusive or

1 || 0 == 1
1 || 1 == 1
0 || 1 == 1
0 || 0 == 0

1 ^^ 0 == 1
0 ^^ 1 == 1
1 ^^ 1 == 0
0 ^^ 0 == 0

BGamed - May 21, 2006 08:52 AM (GMT)
got that :P




* Hosted for free by InvisionFree