我应该为memcpy和realloc添加什么标题? [英] What header should I include for memcpy and realloc?

查看:135
本文介绍了我应该为memcpy和realloc添加什么标题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将一个项目移植到iPhone上,它使用 realloc memcpy 这些未找到的项目。什么是头文件?

I am porting a project to the iPhone and it uses realloc and memcpy which are not found. What is the header to include?

这是一个混合了Objective C和C ++的项目,我开始迷路了。

It's a project mixing Objective C and C++ and I am starting to be lost.


推荐答案

#include <string.h> // memcpy
#include <stdlib.h> //realloc

在C ++中,移除 .h ,前缀为 c 。在C ++中,它们将被放置在 std 命名空间中,但也是全局的。

In C++, remove the .h and prefix with a c. In C++, they will be placed in the std namespace, but are also global.

这篇关于我应该为memcpy和realloc添加什么标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆