Basic C menu

This is a discussion on Basic C menu within the C Programming forums, part of the General Programming Boards category; > the compiler will assume Are you sure? I wouldn't trust it....

  1. #16
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    > the compiler will assume
    Are you sure? I wouldn't trust it.
    The world is waiting. I must leave you now.

  2. #17
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    the compiler will assume whatever function you dont include a header for is extern and search the standard headers then headers in the directory your working from for the matching function
    I suppose that will do.

    >Are you sure? I wouldn't trust it.
    Every compiler I know of will do this, but you can never be sure. So it's always best to include the proper headers.

    >i dont get how this works can someone explain?
    >scanf("%1[1234]c%*c",&choice);
    scanf will read one character which can only be within the range of 1 - 4. It will then read the trailing newline in an attempt to clear the buffer.

    -Prelude
    My best code is written with the delete key.

  3. #18
    Registered User
    Join Date
    Mar 2002
    Posts
    7

    Wink

    cheers every1 for you help it is much appreciated and i understand the simple stuff and it has been very useful! Seems like i accidentally started of a bit of a tiff, lol. Cheers guys.

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

Similar Threads

  1. Replies: 2
    Last Post: 03-05-2009, 10:25 AM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 02:01 AM
  3. Constructive Feed Back (Java Program)
    By xddxogm3 in forum Tech Board
    Replies: 12
    Last Post: 10-10-2004, 04:41 AM

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