see declaration of 'i'
2017-02-21 00:39
134 查看
unsigned int s; 可以是全局局部变量 随机数rand
srand((unsigned)time(0)); //只能是局部变量
s=rand()%10+1;/只能是局部变量
否则会出现see declaration of 'i'
http://www.cctry.com/thread-36733-1-1.html
srand((unsigned)time(0)); //只能是局部变量
s=rand()%10+1;/只能是局部变量
否则会出现see declaration of 'i'
http://www.cctry.com/thread-36733-1-1.html
变量 i 重复初始化了 |
相关文章推荐
- error C2371: 'int8_t' : redefinition; different basic types;see declaration of 'int8_t'
- error C2027: use of undefined type 'A' see declaration of 'A'
- warning C4996: 'sprintf' was declared deprecated see declaration of 'sprintf'
- warning C4996: 'sprintf' was declared deprecated see declaration of 'sprintf'
- 《warning C4996: 'sprintf' was declared deprecated see declaration of 'sprintf'》
- error C2027: useof undefined type 'A' see declaration of 'A'
- The Declaration of Independence
- 关于Xcode6编译变更 “Implicit declaration of function 'sysctl' is invalid in C99” 报错问题
- C++ previous declaration of.with 'C++' linkage
- Php输出Xml报错:XML declaration allowed only at the start of the document
- org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
- 异常:Invocation of com.google.gwt.user.tools.WebAppCreator failed. See the error log for more details
- Can You See The Beauty Of This Photo? Most People Can’t
- a label can only be part of a statement and a declaration is not a statement
- implicit declaration of function 'i2c_transfer'
- 错误:Component is part of the declaration of 2 modules
- Implicit declaration of function '' is invalid in C99.
- error:implicit declaration of function "irq_to_gpio"
- linux编译中error: no arguments depend on a template parameter, declaration of * must 解决
- A story of declaration and defintion (C++)