Thread: GLobal variables

  1. #16
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    Originally posted by Polymorphic OOP
    I was refering to what you wrote in your earlier reply in white -- "see if you can spot the joke"
    What are you talking about!
    Okay, I admit, i've had enough. At this rate, i'll miss new years.


    Global variables + goto eliminates the need for functions, and arguments to functions. You don't have the overhead of a function call, no copy-constructors are called... no subtile errors, stack overflows, etc etc.


    Eibro... signing... off... for... new years!
    gogogogogogogo~~~~ -_-
    Last edited by Eibro; 12-31-2002 at 05:59 PM.

  2. #17
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Originally posted by Eibro
    void main(), global variables, goto... they all have a place in my universe.
    Well your universe is wrong. I'm not going to debate this, but there is never a place in C or C++ for void main. If you want a void main, use Java. Otherwise use int main.

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #18
    A Banana Yoshi's Avatar
    Join Date
    Oct 2001
    Posts
    859
    Code:
    int value = 100;
    
    bool sarcasm(){
    
        cout << "i use bool main(). I am serious!" << value << " % serious!" << endl;
    
        return true;
    
    }
    Last edited by Yoshi; 12-31-2002 at 07:24 PM.
    Yoshi

  4. #19
    Registered User
    Join Date
    Nov 2002
    Posts
    1,109
    Originally posted by Wraith_Master
    i use bool main(). I am serious!
    I hope that ! means you are joking.

  5. #20
    that's because the compiler sees functions and variables as the same thing (I think), in a weird way. Correct me if I'm wrong.

    They also say that you shouldn't make operators do things that aren't related to how the operator works with native types, but what does outputting and inputting data (<< and >> ) have to do with left and right bitshifts?
    It doesn't pertain to bitshifts BUT they work like arrows. It shows where the text goes. Just imagine this:

    cout represents the screen. cout<<"message". "message" goes to cout.

    cin represents what the user types in. cin>>x. The user's input goes into x.

    The same goes for fstream too.

  6. #21
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    Originally posted by Eibro void main(), global variables, goto... they all have a place in my universe.

    see if you can spot the joke
    i think now is a goods time to spoint so out that i was jokicng about the vodi() main... sorryy to sconfuse anyeon

    ok it's[ tbetime.

  7. #22
    Senior Member joshdick's Avatar
    Join Date
    Nov 2002
    Location
    Phildelphia, PA
    Posts
    1,146
    Originally posted by Eibro
    i think now is a goods time to spoint so out that i was jokicng about the vodi() main... sorryy to sconfuse anyeon

    ok it's[ tbetime.
    Ha, ha, I think it's obvious that someone here is drunk.
    FAQ

    "The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.

    "If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 08-06-2008, 09:59 AM
  2. scope of global variables
    By laertius in forum C++ Programming
    Replies: 4
    Last Post: 10-15-2006, 01:59 AM
  3. global variables - okay sometimes...?
    By MadHatter in forum C++ Programming
    Replies: 21
    Last Post: 01-21-2003, 04:23 PM
  4. global variables
    By rdnjr in forum Linux Programming
    Replies: 0
    Last Post: 01-07-2003, 10:28 AM
  5. Global variables? Bad! Yes, but to what extent?
    By Boksha in forum C++ Programming
    Replies: 6
    Last Post: 05-26-2002, 04:37 PM