摘要:        
// 重启应用	public void restartApp() { Intent intent = new Intent(); // 参数1:包名,参数2:程序入口的activity intent.setClassName(getPackageName(), "包名"); PendingIntent restartIntent = PendingIntent.getActivity( getApplicationContext(), 0, intent, Intent.FLAG_ACTIVITY_NEW_TASK); AlarmManager mgr = (Alarm..    阅读全文
        
            posted @ 2014-03-19 15:36
porter_代码工作者
阅读(1404)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
时常在cpp的代码之中看到这样的代码:#ifdef __cplusplusextern "C" {#endif//一段代码#ifdef __cplusplus}#endif 这样的代码到底是什么意思呢?首先,__cplusplus是cpp中的自定义宏,那么定义了这个宏的话表示这是一段cpp的代码,也就是说,上面的代码的含义是:如果这是一段cpp的代码,那么加入extern "C"{和}处理其中的代码。 要明白为何使用extern "C",还得从cpp中对函数的重载处理开始说起。在c++中,为了支持重载机制,在编译生成的汇编码中,要对函    阅读全文
        
            posted @ 2014-03-19 14:58
porter_代码工作者
阅读(400)
评论(0)
推荐(0)
        
        
 
                    
                     
                    
                 
                    
                 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号