Netbeans代码默认为灰色 [英] Netbeans code becoming grey in colour by default

查看:498
本文介绍了Netbeans代码默认为灰色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

#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.





我尝试过:



我使用的是Netbeans IDE 8.2。我正在运行一些C代码。



What I have tried:

I am using Netbeans IDE 8.2. I am running some C code in it.

推荐答案

是的,因为它位于if / else / end子句的'false'部分内,因为你可以清楚请参阅上面的代码。请参阅#if,#elif,#else和#endif Directives(C-C ++) [ ^ ]。
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++)[^].


这篇关于Netbeans代码默认为灰色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆