hello, c/c++
来源:互联网 发布:gtx970 gpuz数据 编辑:程序博客网 时间:2024/05/19 16:38
#include <stdio.h>#include <string>#include <iostream>std::string Hello(){ char buf[32] = "Hello Tyson."; return buf;}char* Hello1(){ char buf[32] = "Hello Tyson."; return buf;}int main(){ std::cout << Hello() << std::endl; std::cout << Hello1() << std::endl; return 0;}selnx176:exufhua__ndpgsn_5_0_wb__ndpgsn_5_0_atm532_1:~/hxfan/lib/linux/net> ./aHello Tyson. üp·
Hello()能正常工作, 原因是 std::string 产生临时变量
&ptr->_val 正常工作, 原因是->比&优先级高
STL algorithm:
find, find_if
gcc中
-DGPBV4 即宏变量GPBV4赋值默认为1
-DCPU=GPBV4 那么宏变量CPU现在的值为1
A* a(new A(5)); 这种给指针赋值的方法很屌
- [C++] Hello
- hello c
- hello.c
- hello c
- hello.c
- Hello,C!
- hello.c
- Hello Objective-C
- hello objective-c
- hello, c/c++
- 温故C++:Hello World
- Hello Object-C.m
- gcc hello.c -lpthread
- C++(1) Hello world!
- Hello object-c!!
- hello.c-hell.ko
- C语言hello world
- Linux C hello world
- Android编译流程_makefile流程
- linux中断导读之--处理流程
- 2012 学习计划
- arm存储模块
- 苹果收购好莱坞公司并非明智之举
- hello, c/c++
- 深入浅出URL编码 .
- Ubuntu下SVN+Apache版本管理服务器配置
- shell脚本文件操作
- Android的启动脚本–init.rc
- 新的一年,给自己几点要求
- mysql创建索引
- 函数对象与函数指针
- 【Android】 Eclipse : ERROR: Unknown option '--no-crunch'的解决办法