---
title: "Discussion on \"指针与运用(Pointers):\" | Hashnode"
description: "Discussion on \"指针与运用(Pointers):\". 引用运算符(&):\n\n基本引用\n #include <iostream>\n\n int main() {\n     int a = 10;\n     int& ref = a; // ref 是 a 的引用，ref 和 a 绑定在一起\n     ref = 20;     // 修改 ref 也会修改 a\n\n     std::cout << \"a: \" << a << std::endl; // 输出 20\n     return 0;\n }\n\n\n函数参数中的作用\n 传递变量的引用：\n #inc..."
url: "https://hashnode.com/posts/pointers/67cef2b4c50b400fe465bd6f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [指针与运用(Pointers):](https://cpp-blog.hashnode.dev/pointers?utm_source=hashnode&utm_medium=feed)

引用运算符(&): 基本引用 #include <iostream> int main() { int a = 10; int& ref = a; // ref 是 a 的引用，ref 和 a 绑定在一起 ref = 20; // 修改 ref 也会修改 a std::cout << "a: " << a << std::endl; // 输出 20 return 0; } 函数参数中的作用 传递变量的引用： #inc...

Mar 10, 2025 · 4 min read · cpp-blog.hashnode.dev  
Read the article

-   [#cpp](https://hashnode.com/tag/cpp)
-   [#pointers-in-cc](https://hashnode.com/tag/pointers-in-cc)
-   [#Address](https://hashnode.com/tag/Address)

## Written by

[Youwei Chen](https://hashnode.com/@Yuk1Juda1)

@Yuk1Juda1

  
[View profile](https://hashnode.com/@Yuk1Juda1)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
