i read the faq, but i dont understand wut int main (int argc, char *argv[]) is

This is a discussion on i read the faq, but i dont understand wut int main (int argc, char *argv[]) is within the C++ Programming forums, part of the General Programming Boards category; >Many things in C++ aren't. We seem to be going in circles. No, you seem to be missing the point. ...

  1. #16
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >Many things in C++ aren't. We seem to be going in circles.
    No, you seem to be missing the point. I'm not talking about you or me writing C++ code. I'm talking about compiling an existing C program as C++ without having to make massive changes. I'm willing to add a cast to malloc calls here and there, but changing every occurance of standard library usage to handle namespaces just so that the program will compile is ridiculous. That is why the C library (as defined by C90) is supported. Not supporting it would break far too much existing code. Now, since the standards committee considers existing C and C++ code and tries to break as little of both as possible, the compromise should make perfect sense.
    My best code is written with the delete key.

  2. #17
    Rad gcn_zelda's Avatar
    Join Date
    Mar 2003
    Posts
    942
    How about we say that stdlib.h was standard and cstdlib is standard and get it over with. I don't see what the big deal is...

  3. #18
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    >> No, you seem to be missing the point.

    No, I know the point you are making, I just disagree. Apparently its a crime to have a differing opinion.

    >> Now, since the standards committee considers existing C and C++ code and tries to break as little of both as possible, the compromise should make perfect sense.

    Don't change anything, and nothing will be broken. There is the solution I posted (which isn't too far off from what a number of compilers do for these headers).

    >> I'm willing to add a cast to malloc calls here and there...

    I've worked with code that uses a lot more mallocs than printfs or other functions, and it can be a pain to go through and cast everything... It can be done though.
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  4. #19
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    Originally posted by gcn_zelda
    How about we say that stdlib.h was standard and cstdlib is standard and get it over with. I don't see what the big deal is...
    Good point. I shall say no more.
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

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

Similar Threads

  1. memory leak
    By aruna1 in forum C++ Programming
    Replies: 3
    Last Post: 08-17-2008, 11:28 PM
  2. Game Won't Compile
    By jothesmo in forum C++ Programming
    Replies: 2
    Last Post: 04-01-2006, 04:24 PM
  3. Switch/case Problems (long code in post)
    By Wraithan in forum C++ Programming
    Replies: 2
    Last Post: 12-01-2005, 06:40 PM
  4. Half-life SDK, where are the constants?
    By bennyandthejets in forum Game Programming
    Replies: 29
    Last Post: 08-25-2003, 12:58 PM
  5. A Simple (?) Problem
    By Unregistered in forum C++ Programming
    Replies: 8
    Last Post: 10-12-2001, 05:28 AM

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