c - 如何在 C 中将 char 指针与 + 运算符连接起来?

标签 c operator-overloading concatenation

有没有办法在c中将char指针与+运算符连接起来?

我知道我可以使用 strcopy() 和 strcat() 连接字符串

How to concat two char * in C?

Concatenate two char* strings in a C program

但是如何将 char 指针与 + operator 连接起来在c中?(也许运算符重载有效,但我不知道如何重载 + 运算符来连接 char 指针)

最佳答案

在 C 中不能这样做。C 不支持运算符重载。

关于c - 如何在 C 中将 char 指针与 + 运算符连接起来?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49948537/

相关文章:

arrays - Excel VBA 连接函数

google-sheets - 在 Google 表格的单个公式中使用 UNIQUE 和 TRANSPOSE

python ctype 字符串指针 32b 与 64b : segmentation fault (core dumped)

c - C 中的动态缓冲区 fgets

c - 几个 Eclipse C/C++ 问题

python - 在 Python 中为表达式定义新的语义

使用 Win32 API 连接字符串

c - 生成由编译器定义的预处理器宏列表

c++ - vector 和 []-运算符重载

c# - Int32 如何重载运算符?