Click here to Skip to main content
15,907,497 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
#else

static double prev_value = 0.0;    // this lines becomes grey

// CLOCK_MONOTONIC represents the absolute elapsed wall-clock time 
//since 
// some arbitrary, fixed point in the past. It isn't affected by 
//changes in 
// the system time-of-day clock.

int r = clock_gettime( CLOCK_MONOTONIC, &t );   // this line also 
 // become grey  

#endif   

if ( r < 0 ) 
{
    // gettime can fail, so we need to do a check and possibly 
    //print error

    fprintf(stderr, "%s\n", strerror(errno)); 


 // On error return previous time


    return prev_value;   // Compiler throws an error that it could not 
                         // resolve the identifier prev_value 

}
The link of the image is this : https://1drv.ms/u/s!AmyCvVHlJ4uYgmyRyBji-3Njj6t9

Please someone help.


What I have tried:

I am using Netbeans IDE 8.2. I am running some C code in it.
Posted
Updated 15-Nov-18 9:08am

1 solution

Yes, because it is inside the 'false' section of an if/else/end clause, as you can clearly see in your code above. See #if, #elif, #else, and #endif Directives (C-C++)[^].
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900