Thread: Using the ciel() function

  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    36

    Using the ciel() function

    I am trying to figure out what I am doing wrong. I have included cmath.

    I want to round the value of a double to the next whole number using the ciel function and store that value in a integer. This is what I have.

    Example:

    Code:
    int wholeScore;
    
    double preciseScore = 7.33;
    
    wholeScore = int ciel( preciseScore )
    The error is type int unexpected. If I do it like this:

    Code:
    wholeScore = ciel( preciseScore )
    I get error ciel undeclared identifier.

    Thanks for your help!

    JLH
    Last edited by jlharrison; 07-07-2006 at 09:14 AM.

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    "i before e except after c" comes to mind. If spelling isn't your strong suit, the good news is that any reference will probably get it right.
    My best code is written with the delete key.

  3. #3
    Registered User
    Join Date
    Jan 2006
    Posts
    36
    OMG Thanks

    I feel so dumb.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 03:06 PM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  3. In over my head
    By Shelnutt2 in forum C Programming
    Replies: 1
    Last Post: 07-08-2008, 06:54 PM
  4. Replies: 28
    Last Post: 07-16-2006, 11:35 PM
  5. const at the end of a sub routine?
    By Kleid-0 in forum C++ Programming
    Replies: 14
    Last Post: 10-23-2005, 06:44 PM