macros with unspecified number of arguments

This is a discussion on macros with unspecified number of arguments within the C Programming forums, part of the General Programming Boards category; TriKi: Trolling is bad. Originally Posted by Dave_Sinkula Are you trolling? Those answers are in the FAQ. Like here: FAQ ...

  1. #16
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,759
    TriKi: Trolling is bad.
    Quote Originally Posted by Dave_Sinkula
    Are you trolling? Those answers are in the FAQ.
    Like here:
    FAQ > Explanations of... > Why fflush(stdin) is wrong
    FAQ > What's the difference between... > main() / void main() / int main() / int main(void) / int main(int argc, char *argv[])
    Quote Originally Posted by quzah
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words!

  2. #17
    Algorithm engineer
    Join Date
    Jun 2006
    Posts
    286
    I am honestly sorry if people sees me as a troller, that has not been my purpose, I really wan't to know the language better. Maybe not the best things to ask for if I take a look at it now, specially judging by the replies I have got... I guess I have to ask the original code writers.

  3. #18
    Dump Truck Internet valis's Avatar
    Join Date
    Jul 2005
    Posts
    357
    In C++ and C89, if you want something with variable argument lists, you need to use variable argument functions.
    I don't really see how this matters. In real applications cross compatability is rarely an issue. I switched to linux from bsd because the same people that constantly complain not enough applications that run on windows (flash 9 for example) run on linux write applications that don't work correctly on bsd, which even provides a linux ABI compatability layer.
    There are plenty of things C99 added that aren't compatible with C++, this is because C isn't a subset of C++, they have become separate languages.
    Why would anyone want to compile a C application with a C++ compiler anyway?

    The designer of an application, rather than meticulously checking everything works correctly in all environments should analyze who the target audience is (how their application would factor into each environment) and who they want to support.
    For example, it's pretty damn hard to find console applictions for windows simply because windows is built to have graphical stuff (the display runs at ring 0 after all)--thus the designer shouldn't really worry about using unix/posix specific calls.
    Another example would be someone designing an appliction for kde that doesn't run on openbsd, not a big deal because if you're running openbsd with kde you're diseased and no one cares about lepers.

    I now end my fat post.

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

Similar Threads

  1. xor linked list
    By adramalech in forum C Programming
    Replies: 23
    Last Post: 10-14-2008, 11:13 AM
  2. Random number + guessing game trouble
    By Ravens'sWrath in forum C Programming
    Replies: 16
    Last Post: 05-08-2007, 04:33 AM
  3. Making a program take a variable number of arguments
    By subtled in forum C Programming
    Replies: 1
    Last Post: 04-17-2007, 06:38 AM
  4. Perfect number...
    By Argo_Jeude in forum C++ Programming
    Replies: 8
    Last Post: 07-12-2005, 02:53 PM
  5. parsing a number
    By juancardenas in forum C Programming
    Replies: 1
    Last Post: 02-19-2003, 01:10 PM

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