strcpy(aCString,stringVariable.c_str() );    //合法 

  aCString = stringVariable.c_str();    //非法 赋值操作符不能用作C字符串

 

 

  字符操作函数  //#include <cctype>

 

  ispunct(Char_Exp)  //标点符号

 

  /*  函数toupper和tolower返回int类型  */

 

  char c = toupper('a');

  cout << c <<endl;

 

  cout << static_cast<char>(toupper('a') ) <<endl;

 posted on 2012-04-15 22:03  飞翔@骑士  阅读(103)  评论(0编辑  收藏  举报