• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
火磷
Memory will fade,but not notes.
博客园    首页    新随笔    联系   管理    订阅  订阅
2015年11月4日
指针与地址
摘要: 1 #include <iostream> 2 using namespace std; 3 int main() { 4 char s1[] = "Hello World"; //字母10位,空格1位,结尾'\0'占一位 5 char *s2 = "Hello World"; //一个指针占4位 阅读全文
posted @ 2015-11-04 20:49 火磷 阅读(231) 评论(0) 推荐(0)
指针
摘要: 1 #include 2 using namespace std; 3 int main() { 4 char s[] = "Hello World"; 5 // char *s = "Hello World"; //指针型*s同样适用 6 7 for (int i = 0; i != 11; ++i) { 8 cout << s[i];... 阅读全文
posted @ 2015-11-04 20:46 火磷 阅读(174) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3