some old shit.

Posts 115 of 19 · Page 1 of 2
some old shit.
lol, i found this while digging thru my old c++ files, looks like i was trying to give myself a sezuire >_<. I bet this is useless to you guys but whatever, it's a way to increase my post count without spamming.

Code:
#include <iostream>
#include <windows.h>

using namespace std;

int main()
{
    int userinput;
    
    system("TITLE SeZuIrE tImE!?!?!?!?!!??!");
    cout<<"Press [ENTER] to continue..." << endl;
    cin.get();
    cout<<"WARNING! do not continue if you are prone to sezuires!" << endl;
    Beep(100,100);
    system("PAUSE");
    cout<<"Please press 1 for strobe light, 2 for strobe flasshing light, or 3 is christmas and press [ENTER] : " << endl;
    cin>> userinput;
    cin.ignore();
    if ( userinput == 2 )
    {
         system("CLS");
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;          
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;          
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
    while ( 1 == 1 )
    {
          system("COLOR 1a");
          system("COLOR 2a");
          system("COLOR 3a");
          system("COLOR 4a");
          system("COLOR 5a");
          system("COLOR 6a");
          system("COLOR 7a");
          system("COLOR 8a");
          system("COLOR 9a");
          system("COLOR 0a");
          system("COLOR ba");
          system("COLOR ca");
          system("COLOR da");
          system("COLOR ea");
          system("COLOR fa");
          system("COLOR 1b");
          system("COLOR 2b");
          system("COLOR 3b");
          system("COLOR 4b");
          system("COLOR 5b");
          system("COLOR 6b");
          system("COLOR 7b");
          system("COLOR 8b");
          system("COLOR 9b");
          system("COLOR 0b");
          system("COLOR ab");
          system("COLOR cb");
          system("COLOR db");
          system("COLOR eb");
          system("COLOR fb");
          system("COLOR 1c");
          system("COLOR 2c");
          system("COLOR 3c");
          system("COLOR 4c");
          system("COLOR 5c");
          system("COLOR 6c");
          system("COLOR 7c");
          system("COLOR 8c");
          system("COLOR 9c");
          system("COLOR 0c");
          system("COLOR ac");
          system("COLOR bc");
          system("COLOR dc");
          system("COLOR ec");
          system("COLOR fc");
          system("COLOR 1d");
          system("COLOR 2d");
          system("COLOR 3d");
          system("COLOR 4d");
          system("COLOR 5d");
          system("COLOR 6d");
          system("COLOR 7d");
          system("COLOR 8d");
          system("COLOR 9d");
          system("COLOR ad");
          system("COLOR bd");
          system("COLOR cd");
          system("COLOR ed");
          system("COLOR fd");
          system("COLOR 1e");
          system("COLOR 2e");
          system("COLOR 3e");
          system("COLOR 4e");
          system("COLOR 5e");
          system("COLOR 6e");
          system("COLOR 7e");
          system("COLOR 8e");
          system("COLOR 9e");
          system("COLOR ae");
          system("COLOR be");
          system("COLOR ce");
          system("COLOR de");
          system("COLOR fe");
          system("COLOR 1f");
          system("COLOR 2f");
          system("COLOR 3f");
          system("COLOR 4f");
          system("COLOR 5f");
          system("COLOR 6f");
          system("COLOR 7f");
          system("COLOR 8f");
          system("COLOR 9f");
          system("COLOR af");
          system("COLOR bf");
          system("COLOR cf");
          system("COLOR df");
          system("COLOR ef");
          system("COLOR 21");
          system("COLOR 31");
          system("COLOR 41");
          system("COLOR 51");
          system("COLOR 61");
          system("COLOR 71");
          system("COLOR 81");
          system("COLOR 91");
          system("COLOR a1");
          system("COLOR b1");
          system("COLOR c1");
          system("COLOR d1");
          system("COLOR e1");
          system("COLOR f1");
          system("COLOR 12");
          system("COLOR 32");
          system("COLOR 42");
          system("COLOR 52");
          system("COLOR 62");
          system("COLOR 72");
          system("COLOR 82");
          system("COLOR 92");
          system("COLOR a2");
          system("COLOR b2");
          system("COLOR c2");
          system("COLOR d2");
          system("COLOR e2");
          system("COLOR f2");
          system("COLOR 13");
          system("COLOR 23");
          system("COLOR 43");
          system("COLOR 53");
          system("COLOR 63");
          system("COLOR 73");
          system("COLOR 83");
          system("COLOR 93");
          system("COLOR a3");
          system("COLOR b3");
          system("COLOR c3");
          system("COLOR d3");
          system("COLOR e3");
          system("COLOR f3");
          system("COLOR 14");
          system("COLOR 24");
          system("COLOR 34");
          system("COLOR 54");
          system("COLOR 64");
          system("COLOR 74");
          system("COLOR 84");
          system("COLOR 94");
          system("COLOR a4");
          system("COLOR b4");
          system("COLOR c4");
          system("COLOR d4");
          system("COLOR e4");
          system("COLOR f4");
          system("COLOR 15");
          system("COLOR 25");
          system("COLOR 35");
          system("COLOR 45");
          system("COLOR 65");
          system("COLOR 75");
          system("COLOR 85");
          system("COLOR 95");
          system("COLOR a5");
          system("COLOR b5");
          system("COLOR c5");
          system("COLOR d5");
          system("COLOR e5");
          system("COLOR f5");
          system("COLOR 16");
          system("COLOR 26");
          system("COLOR 36");
          system("COLOR 46");
          system("COLOR 56");
          system("COLOR 76");
          system("COLOR 86");
          system("COLOR 96");
          system("COLOR a6");
          system("COLOR b6");
          system("COLOR c6");
          system("COLOR d6");
          system("COLOR e6");
          system("COLOR f6");
          system("COLOR 17");
          system("COLOR 27");
          system("COLOR 37");
          system("COLOR 47");
          system("COLOR 57");
          system("COLOR 67");
          system("COLOR 87");
          system("COLOR 97");
          system("COLOR a7");
          system("COLOR b7");
          system("COLOR c7");
          system("COLOR d7");
          system("COLOR e7");
          system("COLOR f7");
          system("COLOR 18");
          system("COLOR 28");
          system("COLOR 38");
          system("COLOR 48");
          system("COLOR 58");
          system("COLOR 68");
          system("COLOR 78");
          system("COLOR 98");
          system("COLOR a8");
          system("COLOR b8");
          system("COLOR c8");
          system("COLOR d8");
          system("COLOR e8");
          system("COLOR f8");
          system("COLOR 19");
          system("COLOR 29");
          system("COLOR 39");
          system("COLOR 49");
          system("COLOR 59");
          system("COLOR 69");
          system("COLOR 79");
          system("COLOR 89");
          system("COLOR a9");
          system("COLOR b9");
          system("COLOR c9");
          system("COLOR d9");
          system("COLOR e9");
          system("COLOR f9");
          }
    }
    else if ( userinput == 1 )
    {
         system("CLS");
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;          
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;          
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          while ( 1 == 1 ) 
          {
                system("COLOR 0f");
                system("COLOR f0");
                }
          }
          else if ( userinput == 3 );
          {
               cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;          
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;          
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          cout<<"LOLZ!" << endl;
          cout<<"SeZuIrE tImE!?!?!?!?!!??!" << endl;
          while ( 1 == 1 )
          {
                system("COLOR ca");
                system("COLOR ac");
                }
    }
}
wow lol.... for/while loop anyone?
Someone was sippin on too much of the happy juice. This is why you don't drink and code kids :P
Quote Originally Posted by why06 View Post
Someone was sippin on too much of the happy juice. This is why you don't drink and code kids :P
B-but, what about the ballmer peak? xkcd - A Webcomic - Ballmer Peak
Code:
    while ( 1 == 1 )
lol when is 1 not 1?
Quote Originally Posted by lalakijilp View Post
Code:
    while ( 1 == 1 )
lol when is 1 not 1?
never, so this loops infinitly untill you call break
Quote Originally Posted by Hell_Demon View Post
never, so this loops infinitly untill you call break
lol, nice program
normally you'd write: while(true) instead of while(1==1) lol
Quote Originally Posted by B1ackAnge1 View Post
normally you'd write: while(true) instead of while(1==1) lol
I was thinking that too, but i suppose to each his own.
Quote Originally Posted by zeco View Post
I was thinking that too, but i suppose to each his own.
Well if I had my way I would write while(false) at the beginning and be done with this godforsaken program D:
i'd turn it into this:
Code:
void main()
{
   return;
}
rofl
Quote Originally Posted by B1ackAnge1 View Post
i'd turn it into this:
Code:
void main()
{
   return;
}
rofl
You can't post a return statement if main is void, it has nothing to retrun too.
Quote Originally Posted by Disturbed View Post
You can't post a return statement if main is void, it has nothing to retrun too.
Not sure if I should laugh or cry at that statement because it's completely wrong...

1st: 'Nothing to return to' has nothing to do with it.. if a Void Main has nowhere to return to, where does an Int Main return to? They both return to the OS which initiated the application process.

Now assuming you perhaps made a typo (lots of non-native english speakers and 'young people' here so that's understandable) and meant to simply say: It has nothing TO return - as in talking about giving a value back to the caller (in this case the OS) then it's still incorrect to say you can't call return.
Calling return with no arguments as I did (return vs such as 'return 0;') simply does as the name implies.. returns and does not return any value (or if you wish to think of it like this: it returns a void).

Of course detail is that you don't HAVE to call return at the end of a void function (which in my post was just a joke to re-inforce it didn't do anything) since it does it automatically but you may want to return in the middle of the code which your post claims you can't do:

Code:
void main()
{
   int x = 3;
   int y = 3;
   if(x==y)
     return; 
   else
   {
     printf("say what now?");
   }

   return; // don't have to do this, but if you like to type extra you can 
             //no one ever really does though
}
or while(1), which is what my old C++ book used althought it doesnt really matter which of these you use ^^
Posts 115 of 19 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

Need help?