Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

‘strncpy’ was not declared in this scope #2

Open
GoogleCodeExporter opened this issue Jul 2, 2015 · 3 comments
Open

‘strncpy’ was not declared in this scope #2

GoogleCodeExporter opened this issue Jul 2, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

test-mul-events.cpp:68: error: ‘strncpy’ was not declared in this scope


哥们,老你们帮我看看这是为什么,我因该怎么做,网上查��
�,不过感觉没说到位,
所以问你们了,谢谢了

Original issue reported on code.google.com by wgc...@gmail.com on 30 Mar 2010 at 12:05

@GoogleCodeExporter
Copy link
Author

你好,strncpy是在string.h头文件中定义的;
源文件中加上
#include <string.h>
就可以了;

我检查了一下,确实没有加入这个头文件,不过我们的测试��
�是正常的(可能是环境原因吧),
疏忽了;

Original comment by sparklin...@gmail.com on 31 Mar 2010 at 1:46

@GoogleCodeExporter
Copy link
Author

Original comment by sparklin...@gmail.com on 31 Mar 2010 at 1:48

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

是的,在源文件上加#include <string.h>是可以了,
不过我在unix-center提供的Linux上编译也是没有问题的,在我自�
��的机器就会出现这个问题的,
不知道具体的原因是什么

谢谢你的回答。

Original comment by wgc...@gmail.com on 31 Mar 2010 at 2:12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant