Thread: How do you assign a "Button" a task ?

  1. #31
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,653
    Quote Originally Posted by kcpilot View Post
    If your code needs "stdafx.h", you are not making a console program --- you're making a windows program. Make a new project and after you have entered the test code from Elysia, make sure that you "Add" that file to your Project (under the Project tab).
    Really? I see a big fat checkbox named "Precompiled header" when creating a new console application. PCH is for any time of project, not just Windows ones.

    Quote Originally Posted by Daved View Post
    >> If there's no prototypes, there's no need for any headers either. Simple as that!
    Exactly. So what are you disagreeing with? In this thread, the code that gave the problem (that you wrote) had no prototypes. Therefore, there is no need for any headers and no need for precompiled headers.
    I wasn't disagreeing with that - I was disagreeing with that it adds complexity that you have to show the code in your headers, especially the stdafx.h one. If you have prototypes, then you should have a header. And if you have a header, then you should show your header, too. And if you can show the contents of a header, then you might as well show the contents of the stdafx.h header, because... well, it's just a header.
    And it's fine to merge the headers with the rest of the code when posting it here.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  2. #32
    Registered User
    Join Date
    Jan 2005
    Posts
    7,366
    >> I wasn't disagreeing with that
    Thanks. I'm glad you agree that discouraging use of precompiled headers in this thread is appropriate.

  3. #33
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,653
    Heh. I agree that discussing whether to teach PCH or not won't get anywhere because we have different opinions, so there's no use discussing it.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 09:35 AM
  2. Where do a task get "wakeuped", blocked, preempted?
    By micke_b in forum Linux Programming
    Replies: 4
    Last Post: 12-28-2007, 04:49 PM
  3. A Task Buffer for storing socket descriptors
    By cloudy in forum Networking/Device Communication
    Replies: 0
    Last Post: 09-09-2006, 01:08 PM
  4. Linked list question....again
    By dP munky in forum C++ Programming
    Replies: 3
    Last Post: 04-03-2003, 05:59 PM
  5. Scheduling Algo
    By BigDaddyDrew in forum C++ Programming
    Replies: 41
    Last Post: 03-08-2003, 11:00 AM