Dev-C++ menu

Shout-Out

User Tag List

Thread: Dev-C++

Page 2 of 2 FirstFirst 12
Results 16 to 24 of 24
  1. #16
    Froogle's Avatar Legendary
    Reputation
    690
    Join Date
    Jan 2007
    Posts
    787
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by LongBow View Post
    Putting a while(1); before the return wouldn't require any includes and is platform independant.
    A while(1); statement is a loop... and in the nature that it's being used, it will take up a hefty amount of processing power o.O


    Dev-C++
  2. #17
    LongBow's Avatar Member
    Reputation
    5
    Join Date
    Aug 2008
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The only complaints I saw of the other proposed ideas was platform dependency and requiring includes. I merely replaced two cons with another. It might be seen as "crashing" the program but it still solves the initial proposed problem.

    while(1) (obviously with a corresponding code block) is a common practice when programming devices such as PICs in C. If the program runs off the end of the main function the PIC crashes so there needs to be an infinite loop somewhere. Although, I do recognize the original poster was probably running their code under Windows.

  3. #18
    Froogle's Avatar Legendary
    Reputation
    690
    Join Date
    Jan 2007
    Posts
    787
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My proposed idea has neither of those cons... or the con that your method is providing. Yours also can't be used to resume the program, incase someone wanted to "pause" the program in a different spot (unless you used something like signal, but then it wouldn't be while(1)).


  4. #19
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Holy christ batman, theres a lot of shitty ideas in this thread!

    Code:
    	// Stop window from automatically closing
    	std::cin.clear();
    	std::cin.sync();
    	std::cin.get();
    Problem solved.

    Why the other ideas are retarded:

    while(1) {}
    This will cause the program to not return correctly and hence the destructors of local and static objects will never be called.

    system("pause");
    This is non-portable, 'slow' (compared to the proper alternatives), and just plain stupid.
    Last edited by Cypher; 05-28-2009 at 07:38 PM.

  5. #20
    kylemartin1139's Avatar Member
    Reputation
    1
    Join Date
    Nov 2007
    Posts
    34
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use less comments. Comments should be there to remind you what certain things do incase u set a project aside. Dont comment every line... Just use like:

    Code:
    //Death function
    int death()
    {
     blah blah
    }
    
    //Health Regen Function
    void health regen()
    {
       Blah blah
    }

  6. #21
    Xarg0's Avatar Member
    Reputation
    61
    Join Date
    Jan 2008
    Posts
    389
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Cypher View Post
    Holy christ batman, theres a lot of shitty ideas in this thread!

    Code:
    	// Stop window from automatically closing
    	std::cin.clear();
    	std::cin.sync();
    	std::cin.get();
    Problem solved.

    Why the other ideas are retarded:

    while(1) {}
    This will cause the program to not return correctly and hence the destructors of local and static objects will never be called.

    system("pause");
    This is non-portable, 'slow' (compared to the proper alternatives), and just plain stupid.
    I like the while(1){} solution, it looks indeed a bit like windows sourcecode
    http://www.albinoblacksheep.com/text/source
    Last edited by Xarg0; 06-09-2009 at 06:06 AM.
    I hacked 127.0.0.1

  7. #22
    Barnzy's Avatar Member
    Reputation
    67
    Join Date
    Jun 2008
    Posts
    302
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use system("PAUSE");

    nothing wrong with it lol

  8. #23
    Froogle's Avatar Legendary
    Reputation
    690
    Join Date
    Jan 2007
    Posts
    787
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes there is... if you ever plan to code anything above amateur level then you'll have to stop using kiddy system commands.


  9. #24
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Barnzy View Post
    I use system("PAUSE");

    nothing wrong with it lol
    Are you blind, illiterate, or just retarded?

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [READ/RELEASE] One of the best EMU-Devs arround and some of his work posted here!
    By latruwski in forum World of Warcraft Emulator Servers
    Replies: 7
    Last Post: 11-17-2007, 07:43 AM
  2. Deathreach WoW Dev Team [recruiting]
    By Equ1N0X in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 11-02-2007, 06:40 PM
  3. [Help Wanted]Admin/Dev send Mail via Website
    By Zaphieon in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 10-19-2007, 11:48 AM
  4. Looking for MMORPG dev team.
    By shade599 in forum Community Chat
    Replies: 24
    Last Post: 08-15-2007, 07:11 AM
  5. Prog/Dev Island
    By dela in forum World of Warcraft General
    Replies: 3
    Last Post: 10-04-2006, 10:41 AM
All times are GMT -5. The time now is 09:07 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search