Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: My first C program is ready

  1. #11
    Join Date
    Mar 2006
    Location
    Philadelphia, PA
    Beans
    472

    Re: My first C program is ready

    Quote Originally Posted by Compyx View Post
    It isn't. const is still a type qualifier, just like in C89/C90, it doesn't provide a constant like in C++.

    Other additions to C99 include the declaration/definition of new types without starting a new block, ie:
    Code:
    for (int i = 0; i < 10; i++)
    The are also variable length arrays, // comments and implicit int was removed (finally!).

    One thing C99 isn't is 'C with some C++' thrown in'. It also isn't very generally implemented or accepted.

    Google for 'n1256.pdf' to find the latest draft of the C99 standard if you want to learn more.
    I tried doing that once with gcc 4.1 and it gave me an error saying I couldn't do that. :/
    Ubuntu User #: 0x2695 | Banshee 1.8/2.0 Pidgin Plugin

    Intel Q6600 @3.21, 4GB, GTX260, ArchLinux
    Lenovo IdeaPad S10, 1.6GHz Intel Atom, ArchLinux

  2. #12
    Join Date
    Jan 2006
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: My first C program is ready

    Quote Originally Posted by scourge View Post
    Interesting. There seems to be some confusion about this, and the Wikipedia article actually says about C89 that "this version of the language is often referred to as ANSI C...". It clearly says that C99 is an ANSI standard though.



    How is const in C99 different from C89?
    I did not know const was in c89
    I am infallible, you should know that by now.
    "My favorite language is call STAR. It's extremely concise. It has exactly one verb '*', which does exactly what I want at the moment." --Larry Wall
    (02:15:31 PM) ***TimToady and snake oil go way back...
    42 lines of Perl - SHI - Home Site

  3. #13
    Join Date
    Apr 2005
    Location
    Finland
    Beans
    272

    Re: My first C program is ready

    I tried doing that once with gcc 4.1 and it gave me an error saying I couldn't do that. :/
    You probably didn't give gcc the std=c99 or std=gnu99 argument.

    I use C99 in my chess engine mainly because I need fixed-length integers and 64-bit integers.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •