Thread: The Best thread EVER!

  1. #1
    eat my shorts!
    Join Date
    Apr 2002
    Posts
    294

    The Best thread EVER!

    ok i am pretty sure this post i gona be filled

    so this post is about goodies. wat i mean by that is u know small things that make ur code and prgram much more efficient and lets u have fun.

    for example shutdown ur computer or restart
    u know wat i mean


    ok, so people start posting now!

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    I can shutdown, restart and logoff my pc using C++.....cant say it has increased the "fun factor" of my programs though

  3. #3
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,490
    the best thread ever would have to be the one that pamela's langerie is made of

  4. #4
    eat my shorts!
    Join Date
    Apr 2002
    Posts
    294
    Originally posted by Fordy
    I can shutdown, restart and logoff my pc using C++.....cant say it has increased the "fun factor" of my programs though
    It may not be fun for you but alot of new programmers are looking for codes such as Shutdown and other.

    so if u know plz share

  5. #5
    Pygmy Monkey ErionD's Avatar
    Join Date
    Feb 2002
    Posts
    408
    >alot of new programmers are looking for codes such as Shutdown

    For what exactly?
    Can't remember seeing people asking about shutdowns and stuff on this board for a pretty long time.

    Hmm goodies.
    Goto

    One thing you might see in people's code are the "magic numbers and variables".
    For example:

    Code:
    while(!a||(14.2-b)!=strlen(c)) {
    cout << (drg-14);
    b++;
    jj= b - 3;
    }
    Get rid of this by using defines.
    Example:

    Code:
    #define MAX_COLUMNS 14
    
    or for variables
    
    #define NR_OF_SHIPS var_name

  6. #6
    Registered User
    Join Date
    Apr 2002
    Posts
    139
    I have an old pascal program that I wrote in like 5th grade that simulates a hard drive format it makes the nice hard drive sound too (I still remember my friends dad having a heart attack when he accidently ran that) ahh fond memories....

  7. #7
    eat my shorts!
    Join Date
    Apr 2002
    Posts
    294
    Originally posted by lostminds
    I have an old pascal program that I wrote in like 5th grade that simulates a hard drive format it makes the nice hard drive sound too (I still remember my friends dad having a heart attack when he accidently ran that) ahh fond memories....
    lol

    ok, maybe people are not asking in this board but i have seen people asking in other boards

    lol
    gimme the damn code

  8. #8
    Registered User
    Join Date
    Dec 2001
    Posts
    206
    system("logoff");

    thatll log you off of windows :P

  9. #9
    eat my shorts!
    Join Date
    Apr 2002
    Posts
    294
    let me guess

    system ("restart");
    system ("shutdown");

  10. #10
    eat my shorts!
    Join Date
    Apr 2002
    Posts
    294
    IT DOESNT work

    see wat i mean, people want to know this stuff
    so post!

  11. #11
    Registered User biosx's Avatar
    Join Date
    Aug 2001
    Posts
    230
    Originally posted by dayknight
    let me guess

    system ("restart");
    system ("shutdown");
    No, those aren't valid console commands.

  12. #12
    eat my shorts!
    Join Date
    Apr 2002
    Posts
    294
    so isnt
    system("logoff");

    if u know how to post em here, that's y i started this thread

  13. #13
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,490
    linux has logout, shutdown now, and reboot as console commands

  14. #14
    eat my shorts!
    Join Date
    Apr 2002
    Posts
    294
    Originally posted by ygfperson
    linux has logout, shutdown now, and reboot as console commands
    1 thing is for sure, they do not work on windows
    (damn u BILL, soon i will own windows and make it ezier than ever for programmers to code)

  15. #15
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,490
    Originally posted by dayknight


    1 thing is for sure, they do not work on windows
    (damn u BILL, soon i will own windows and make it ezier than ever for programmers to code)
    i think bill gates is already heading in that direction.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Thread Synchronization in Win32
    By passionate_guy in forum C Programming
    Replies: 0
    Last Post: 02-06-2006, 05:34 AM
  2. [code] Win32 Thread Object
    By Codeplug in forum Windows Programming
    Replies: 0
    Last Post: 06-03-2005, 03:55 PM
  3. Win32 Thread Object Model Revisted
    By Codeplug in forum Windows Programming
    Replies: 5
    Last Post: 12-15-2004, 08:50 AM
  4. Simple thread object model (my first post)
    By Codeplug in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2004, 11:34 PM
  5. Problem : Threads WILL NOT DIE!!
    By hanhao in forum C++ Programming
    Replies: 2
    Last Post: 04-16-2004, 01:37 PM