摘要:        
可以设置函数属性(Function Attribute), 变量属性(Variable Attribute), 类型屬性(Type Attribute)语法: __attribute__ (parameter) 注: attribute 前后各有两个下划线(underscore) 后面紧跟小括号((bracket)), 括号中间为__attribute__参数.其位置一般于声明的尾部; 以前函数属性(Function Attribute) 函数属性可以帮助开发者把一些特性添加到函数声明中,从而可以使编译器在错误检查方面的功能更强 大。__attribute__机制也很容易同非GNU应用程序做到    阅读全文
posted @ 2012-09-27 16:59
瑞尼书苑
阅读(158)
评论(0)
推荐(0)
        
            
        
        
摘要:        
#include <string>//使用C++标准库的string类时using namespace std;//同上#include <sstream>#include <iostream>#include <stdlib.h>//要将string类和int类型直接转换最好有这些包含,//因为自己写一个转换函数比较方便,函数定义参考如下string getstring ( const int n ){std::stringstream newstr;newstr<<n;return newstr.str();}//////////    阅读全文
posted @ 2012-09-27 14:19
瑞尼书苑
阅读(225)
评论(0)
推荐(0)
        
 
                    
                     
                    
                 
                    
                 
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号