Redian新闻
>
Help!! programming problem on Mac
avatar
Help!! programming problem on Mac# Apple - 家有苹果
b*g
1
Hi,
I am trying to write a program on mac. The program works on
PC, however, when I run it on Mac, some weird things happen.
The values of some variables keep changing. I suspect there
are at least two things related: memory allocation and
double precision. But I monitored all the memory allocation,
there are no error reported. For some double precision
variables, the values does change, but not all the
variables. I didn't use any mac toolbox or any specific
functions, and all the codes are in
avatar
f*n
2
maybe some of your variables are not initialized properly. you
know, for auto variables, they are generated dynamically. maybe
your PC compiler gives these variable a default value(probably 0)
while your Mac compiler does not.

【在 b****g 的大作中提到】
: Hi,
: I am trying to write a program on mac. The program works on
: PC, however, when I run it on Mac, some weird things happen.
: The values of some variables keep changing. I suspect there
: are at least two things related: memory allocation and
: double precision. But I monitored all the memory allocation,
: there are no error reported. For some double precision
: variables, the values does change, but not all the
: variables. I didn't use any mac toolbox or any specific
: functions, and all the codes are in

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。