1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

need help!

Discussion in 'C' started by ratheeshp, May 24, 2007.

  1. ratheeshp

    ratheeshp New Member

    Joined:
    May 24, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Is it possible to write "return" function inside a conditional operator? If yes please inform me how is it possible.
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,283
    Likes Received:
    364
    Trophy Points:
    83
    Code:
    x>1?1:fx();
    fx return type is an integer.
     
  3. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    If you mean return keyword instead of return function, then:
    Code:
        if (error) return EOF;
    
     

Share This Page