![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
编程语言 c
勇zhe无wei
这个作者很懒,什么都没留下…
展开
-
C string类c_str() 详解
C string类c_str() 详解c_str() 返回以最后一个指向null结束。#include <iostream>using namespace std;int main(int argc, char *argv[]){ const char *ch; string s = "abcdef"; ch = s.c_str(); cout<<ch原创 2015-02-06 11:46:46 · 1691 阅读 · 0 评论 -
C/C++中判断GCC版本
#include <stdio.h>#include <stdlib.h>int main(){ printf("%d\n",__GNUC__); printf("%d\n",__GNUC_MINOR__); printf("%d\n",__GNUC_PATCHLEVEL__); return 0;}result: 4 8 2原创 2015-04-13 16:16:18 · 4959 阅读 · 0 评论