Important Note(A post to end all newbie topics concerning......)

This is a discussion on Important Note(A post to end all newbie topics concerning......) within the C++ Programming forums, part of the General Programming Boards category; Everyday for the last two months I've found threads started by newbies concerning this topic: How do I keep a ...

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    156

    Important Note(A post to end all newbie topics concerning......)

    Everyday for the last two months I've found threads started by newbies concerning this topic:

    How do I keep a window from closing?
    My window closes automatically, help!!!
    How do I prevent a window from closing fast?

    Well, I've made this topic to help answer that. So that when newbies could look at this topic before they post.

    For the Dev-C++4 IDE(Compiler: MingW), and some others. The functions to keep a window from closing are as follow:

    1. system("pause");
    2. Sleep(number_of_Miliseconds);
    3. getch();
    4. getchar();
    5. cin.get();

    ----------------------------------------------------
    1. Include stdlib.h, this is really a C function
    2. Include windows.h, the function name is case sensative. The S must be capitalized. Place the number of miliseconds in the paranthesees. This is bad practice using this function as a window close preventer, but it is possible.
    3. Include conio.h(conio.c in Dev-C++), place this before return 0;
    4. Same as getch();
    5. Most advance programmers use this. Most programmers would say that cin.get is the best way.

    [GB Edit: ] Mods, it wouldn't hurt to stick this topic. It is helpful. Also if there are any programming mistakes within this topic. Feel free to edit it. The newbies will read it so it has to be perfect.
    Compiler: MingW(IDE: Bloodshed Dev-C++ 4.01)
    Web Site: Zoo Crew
    Forums: Zoo Boards
    E-mail: goldenbunny84@hotmail.com

    "Do you wanna go to jail or do you wanna go home?!?!" - Alonzo(Training Day)

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    The reason they make new threads is they don't look for old topics, so why should they read this one?
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Registered User
    Join Date
    Jan 2002
    Posts
    387
    >> This is bad practice using this function as a window close preventer
    No it isnt, not as bad as system("PAUSE")

    >> 3. Include conio.h(conio.c in Dev-C++), place this before return 0;
    BONNY, i tell you this all the time, DO NOT INCLUDE *.c FILES! YOU ADD THEM TO YOUR PROJECT IF U WANT TO USE THEM

    >> Most advance programmers use this
    Actually most advanced programmers arnt stuck in console programming

    [EDIT] Mods, dont stick this, bonny just wants to see his name as a sticky, and this topic has been discussed lots of times, if newbies actually read stickies and that, they would know to use the search engine [/EDIT]
    Last edited by Okiesmokie; 05-16-2002 at 03:27 PM.
    "There are three kinds of people in the world...
    Those that can count and those that can't."

  4. #4
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065
    Okie, my friend, you have surpassed my level of jerkatude. I honorably step down and assume the title "demi-jerk".

    :-< ..... :-( .... **dang! where's the submission to the greater
    power smily!?!?! Guess I'll have to settle for a sad one**



    Bro, that was harsh!



    Seriously though, GBonny, no offense, but the last thing Okie said is dead on. If newbies read stickies then we'd never see another question like that again.

  5. #5
    Registered User Mario's Avatar
    Join Date
    May 2002
    Posts
    317

    Re: Important Note(A post to end all newbie topics concerning......)

    Originally posted by Golden Bunny
    3. Include conio.h(conio.c in Dev-C++), place this before return 0;
    Dev-C++ has conio.h. No need to do that. It uses the mingw port of GCC and as such is pretty complete on what comes to standardized libraries. Besides, one should never do include statements for code files.

    I don't know much about C/C++. So, as a newbie, I'm perfectly comfortable to say that the above won't help anyone. On the contrary...
    Regards,
    Mario Figueiredo
    Using Borland C++ Builder 5

    Read the Tao of Programming
    This advise was brought to you by the Comitee for a Service Packless World

  6. #6
    Registered User
    Join Date
    Jan 2002
    Posts
    387
    >> Okie, my friend, you have surpassed my level of jerkatude
    OMG YES!!!
    *holds up trophy and starts his thank-you speech*
    *clears throat*
    "I'd like to thank Bonny, for being such a jerk to me in the past so that i was able to blow up at you, And jdinger, for admitting defeat :P"

    Although, i am sorry bonny, i actually should of sed it more politely
    "There are three kinds of people in the world...
    Those that can count and those that can't."

  7. #7
    Registered User Mario's Avatar
    Join Date
    May 2002
    Posts
    317

    Re: Important Note(A post to end all newbie topics concerning......)

    Originally posted by Golden Bunny
    2. Include windows.h, the function name is case sensative.
    Only now noticed this one...
    Without further explanation (and considering newbies like me would read this) it implies this particular function is case sensitive, when in fact C/C++ is case sensitive all over.
    Regards,
    Mario Figueiredo
    Using Borland C++ Builder 5

    Read the Tao of Programming
    This advise was brought to you by the Comitee for a Service Packless World

  8. #8
    Registered User
    Join Date
    Jan 2002
    Posts
    387
    >> when in fact C/C++ is case sensitive all over.
    How true

    StRcAt() != strcat()

    Dont you think they should change the != to =/= ?
    =/= looks soooooooooooooooooooo^10 much better
    "There are three kinds of people in the world...
    Those that can count and those that can't."

  9. #9
    Registered User Mario's Avatar
    Join Date
    May 2002
    Posts
    317
    Now that you mentioned it...

    I always had a terrible time trying to understand what exactly was on their mind when they decided for ! to represent NOT.

    I mean, I find an exclamation mark so positive
    Regards,
    Mario Figueiredo
    Using Borland C++ Builder 5

    Read the Tao of Programming
    This advise was brought to you by the Comitee for a Service Packless World

  10. #10
    Registered User
    Join Date
    Jan 2002
    Posts
    387
    >> I mean, I find an exclamation mark so positive

    DEFINATLY!!!!!!!!! <-
    "There are three kinds of people in the world...
    Those that can count and those that can't."

  11. #11
    Registered User
    Join Date
    Apr 2002
    Posts
    156
    Well, I try to change my attitude by helping newborns(newbies) but I continue to get bashed. I'll ignore the bashing. Though what Oki said was false. I'm not doing this just to see my name as a sticky. You always assume that GB has a secret motive behind every move I make.
    Even if I try to act nice I will get peed on.
    Compiler: MingW(IDE: Bloodshed Dev-C++ 4.01)
    Web Site: Zoo Crew
    Forums: Zoo Boards
    E-mail: goldenbunny84@hotmail.com

    "Do you wanna go to jail or do you wanna go home?!?!" - Alonzo(Training Day)

  12. #12
    Registered User Aran's Avatar
    Join Date
    Aug 2001
    Posts
    1,301
    well, GB is just a retard towards you to get a favour from you. He'll be offensive and stupid to you and tell you that if you do something for him, he'll stop.

    live with it, it's what he does (albeit retarded).

    anyhow:

    newbies don't read ANYTHING. they just come here and post. this thread is useless (besides for GB bashing).

  13. #13
    Registered User
    Join Date
    Apr 2002
    Posts
    156
    I agree, Oki3 is a retard towards people. Just to get favors from them.
    Compiler: MingW(IDE: Bloodshed Dev-C++ 4.01)
    Web Site: Zoo Crew
    Forums: Zoo Boards
    E-mail: goldenbunny84@hotmail.com

    "Do you wanna go to jail or do you wanna go home?!?!" - Alonzo(Training Day)

  14. #14
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    comes to standardized libraries. Besides, one should never do
    include statements for code files.
    I do this all the time. Usually when I'm using templates or I'm using inline functions.

  15. #15
    Registered User Aran's Avatar
    Join Date
    Aug 2001
    Posts
    1,301
    GB:

    you need to use your eyes and read. i clearly adressed my post to you.

    I have nothing against okie smokie. I have everything to hold against you.

    Now, grow up and learn something from what has happened tonight.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem building Quake source
    By Silvercord in forum Game Programming
    Replies: 16
    Last Post: 07-11-2010, 09:13 AM
  2. need some help with last part of arrays
    By Lince in forum C Programming
    Replies: 3
    Last Post: 11-18-2006, 08:13 AM
  3. New compiler - Weird errors -,-.
    By Blackroot in forum C++ Programming
    Replies: 8
    Last Post: 08-27-2006, 07:23 AM
  4. Another multi boot Newbie Linux post!
    By Bajanine in forum Tech Board
    Replies: 4
    Last Post: 06-18-2004, 09:19 PM
  5. Next Question...
    By Azmeos in forum C++ Programming
    Replies: 3
    Last Post: 06-06-2003, 02:40 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21