Introduction: Coollest 6 Lines C++ Program

This is a funny program I made while learning C++. Idea by My!! I hope no one has done this before =D... Maybee i just reinvented the bike, but its fun!! Code should work on windows and linux. but you have to compile it yourself and little diferent than how I done. THIS INSTRUCTABLE IS MADE BASICLY FOR MAC USERS WITH Xcode!!!
I'am NOT RESPONSABLE IF THIS APP WILL BURN YOUR COMPUTER! USE AT YOUR OWN RISK!

What does it do?
Simple. LAG! On MAC!!!

Features ( =D):

  # It gives continiuos alert sounds (in my case submarine beeps) forever until You terminate it.
  # Prints Your message(In My case danger!! some $%# and LAG) forever until You terminate it.
  # It uses lot of processing power till You terminate it.
  # It is not very easy to terminate it.
  # If You have selected terminal and try to type something it gets even more annoying( some kind of Laggy sounds)!!

Attachments

Step 1: You Will Need.

Stuff you will need is:

ANY PC or MAC (newer then one from 1983)
C++ compiler or IDE
Plain text editor or IDE
Some command line knowlage

Optional:

Good music while Programming.


Step 2: The Code

Paste this code instead of the one you heve in main.cpp (if there is some code)

The source code:

#include < iostream>
int main () {
    while (1){
        std::cout<< "DAnGer!&$!@#^^%$#    LAG )( *&^%  ^%@%# ?>|  \a\a\a\a\a\a";
}}


Step 3: How It Works AND Customize It!!


#include < iostream>

\\ Iostream is basic c++ library and its needed for our program. We include it using #include.

int main ()

\\ int main is the main function which is always executed.

{


\\start of main () funcion tree.

    while (1)

\\ Infinite cycle veriable. (1) makes it infinite.

{

\\ { is a start of our infinite cycle tree.

   std::cout<< "DAnGer!&$!@#^^%$#    LAG )( *&^%  ^%@%# ?>|  \a\a\a\a\a\a";

\* std:: means we use stuff from iostream library. cout is thing that prints stuff in screen. << gives cout what to print. "   " inside commas is stuff that we need to print on scree. \a will not be printed because its command that gives alert. this cout repeats forever because its in infinite cycle.
if Your want custom text  You suhould replace "DAnGer!&$!@#^^%$#    LAG )( *&^%  ^%@%# ?>|  \a\a\a\a\a\a" with "Your text here \a\a\a\a\a" Your text mustn't contain commas (")   *\


}}

\\ these } closes our cycle tree and function main () tree.

Step 4: Compile.

Compile your way or simply press cmd+b.
If You are on Xcode I don't recommend to "press build and run" key.

Step 5: Run and Terminate.

Result will be in Xcode and in DirectoryOfYourProject/build/debug/

Now test it. if stuff goes bad Terminate it using cmd+alt+esc key. it will still be running, but You wont be able to see! go to applications/utilitys/Activity Monitor and terminate it from there.

Step 6: Put It in Use! (prank)

Now lets make some fun. Customize this application and send it to your friends. Good for april foolz.

I will pretend its a tic tac toe game.

1st find icon
Use icon composer to convert it into .icns
Then select executable in finder press cmd+i
Drag icns file like you see in picture
Rename Your lag so it will look like game
Send it to your good friend...
    ..... orrrrr enemy! =D

Enjoy!

You can download allready finished application.

P.S. If you want even more lag you can add some pointless mathematics to optimise your application for even more CPU use....