.c_str()/atoi()/

1. c_str是把string类型强制转换为const string

 

2. atpi(): Convert string to integer --Parses the C-string str interpreting its content as an integral number, which is returned as a value of type int.

int atoi (const char * str);

atol:Convert string to long integer (function )

struct test 
{ 
    char name[10]; 
    float socre; 
    test *next; 
};//这样是正确的!
struct test 
{ 
    char name[10]; 
    float socre; 
    test next; 
};//这样是错误的! 

利用结构体的这点特殊特性,我们就可以自己生成一个环环相套的一种射线结构,一个指向另一个。

 

posted @ 2014-01-14 06:27  刺客主谋  Views(179)  Comments(0Edit  收藏  举报