Storing functors?

This is a discussion on Storing functors? within the C++ Programming forums, part of the General Programming Boards category; So, I am to understand the following changes: Not as far as I'm concerned. I just think that a function ...

  1. #16
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    So, I am to understand the following changes:
    Not as far as I'm concerned. I just think that a function is a better place to put all the functionality.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  2. #17
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,538
    But functions do not have the flexibility of classes... No possibility of overriding the conversion part, for example.
    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.

  3. #18
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    *shrug*

    That sounds more like feature creep than something you actually need to me.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #19
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,538
    Yes, but then again, I like flexibility. If you wanted to change the conversion part, I'd have to break it out into its own function which you could specialize, in order to avoid re-coding everything else... and you have to specialize it for every type you want it to do differently.

    I still think I'm going for a class, but taking into account what everyone thinks...
    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.

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

Similar Threads

  1. Storing Cstrings in an Array
    By Tien1868 in forum C Programming
    Replies: 4
    Last Post: 07-09-2009, 07:48 PM
  2. Storing Passwords/Encryption
    By Tonto in forum C++ Programming
    Replies: 8
    Last Post: 07-01-2009, 09:05 PM
  3. Storing Objects in txt files?
    By Swerve in forum C++ Programming
    Replies: 4
    Last Post: 03-15-2009, 12:17 PM
  4. Variable Storing in memory
    By karb0noxyde in forum C++ Programming
    Replies: 7
    Last Post: 10-11-2004, 07:31 PM
  5. File Reading and storing to 1 variable
    By Rare177 in forum C Programming
    Replies: 34
    Last Post: 07-13-2004, 12:58 PM

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