小编Abh*_*iri的帖子

使您的python代码在所有计算机上执行

我已经写了一个python GUI应用程序.我想在我朋友的计算机上运行代码,他的计算机上没有python解释器,而且由于无法连接到互联网而无法下载.如何制作发生?

python exe python-2.7

1
推荐指数
1
解决办法
115
查看次数

分段在动态数组上使用tolower()时出错

我将此代码放在我的C编译器(Dev Cpp)上.

char *str = "SomeTHing";
for(int i = 0; str[i]; i++){
   str[i] = tolower(str[i]);
}
Run Code Online (Sandbox Code Playgroud)

这给出了分段错误,而如果我使用静态数组,

char str[10] = "SomeTHing";
Run Code Online (Sandbox Code Playgroud)

循环工作正常.任何人都可以告诉为什么会这样吗?

c arrays tolower

-1
推荐指数
1
解决办法
259
查看次数

标签 统计

arrays ×1

c ×1

exe ×1

python ×1

python-2.7 ×1

tolower ×1