博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Variably modified array at file scope
阅读量:4286 次
发布时间:2019-05-27

本文共 299 字,大约阅读时间需要 1 分钟。

遇到这个问题好几次了,记录下:

[cpp] 
 
 
  1. const int N = 100005;  
  2. int stack1[N];  

错误信息:

[plain] 
 
 
  1. error: variably modified 'stack1' at file scope  

错误原因:

The reason for this warning is that  So the value is stored at a memory address and could potentially be changed by machine code.

解决办法:

[cpp] 
 
 
  1. #define N  100005  
  2. int stack1[N];  

转载地址:http://ztxgi.baihongyu.com/

你可能感兴趣的文章
ios之NSFileManager文件操作
查看>>
iOS NSThread多线程枷锁
查看>>
ios/OC之调用系统相机录像、拍照、打开相册
查看>>
iOS中需要重新布局的几中情况调用的方法
查看>>
iOS. NSCache的缓存
查看>>
iOS之属性引用self.xx与_xx的区别
查看>>
iOS 项目的基本配置bundleId/版本命名/....
查看>>
iOS之CoreImage图像处理框架
查看>>
iOS tableview中cell设置的注意事项
查看>>
iOS之文本处框架CoreText(C语言的框架)
查看>>
iOS之文本处理框架TextKit介绍/NSMutableString
查看>>
iOS. Instruments的使用
查看>>
iOS中显示GIF动画
查看>>
iOS CALayer的transform属性(QuartzCore框架)和view的transform属性(CoreGraphics框架)
查看>>
iOS 网络请求判断连接和状态码
查看>>
iOS之ARC内存管理及强弱指针(二)
查看>>
iOS. Xcode7.1中在请求HTTP时报错的解决方法
查看>>
iOS 网络请求数据工具封装
查看>>
iOS之电商项目中的注意事项
查看>>
iOS文字上面划线的几中方式
查看>>