当前位置: 代码迷 >> Java相关 >> [求助]JAVA有JRE可以使JAVA跨平台,C++为什么不能有CRE,这样C++也可以跨平台 ...
  详细解决方案

[求助]JAVA有JRE可以使JAVA跨平台,C++为什么不能有CRE,这样C++也可以跨平台 ...

热度:258   发布时间:2007-03-24 18:18:56.0
[求助]JAVA有JRE可以使JAVA跨平台,C++为什么不能有CRE,这样C++也可以跨平台了?
各位前辈JAVA有JRE,这样可以通过不跨平台的JVM来实现JAVA的跨平台,那么为什么C++就不能有个CVM或着CRE什么的,这样C++不是也可以跨平台了吗?既然现在C++不能跨平台,这说明JAVA和C++还是有本质区别的,请问各位前辈是什么原因使C++不能跨平台?
搜索更多相关的解决方案: JAVA  跨平台  CRE  JRE  

----------------解决方案--------------------------------------------------------
Just a example.
If you storage a type of int var in a file on the 16bits OS,
now : how did you read it from 32bits OS without error?

in 16bits OS, type of int's size is 2Bytes
but in 32bits it's 4Bytes

that's the one difficult to realize the Cross-platform by C/C++



By the way, some C/C++'s Libs in different OS maybe ware not the same. Maybe, I juse say : maybe~~ :)

[此贴子已经被作者于2007-3-24 20:26:04编辑过]


----------------解决方案--------------------------------------------------------
First.Thank you for your answer,but i still feel a little confused..
why does the c++ not to operate the date type like java?
why does the c++ not to also prescribe the primitive type on a fixed byte in the different OS?
----------------解决方案--------------------------------------------------------
  相关解决方案