Linux或Windows中的C ++ [英] C++ in Linux or Windows
问题描述
在Linux或Windows中编写C ++有什么区别吗?
我被告知这只是可用IDE的问题(两者都是日食)
平台,但只有Visual Studio for Windows)但还有其他
techincal / syntatical /标准库函数的区别吗?
Johs >
Are there any difference between writting C++ in linux or Windows?
I was told that it was only a matter of available IDE''s (eclipse for both
platforms, but only Visual Studio for Windows) but are there other
techincal/syntatical/standard library function differences?
Johs
推荐答案
Johs skrev:
Johs skrev:
在Linux或Windows中编写C ++有什么区别吗? br />
有人告诉我这只是可用IDE的问题(两个
平台的eclipse,但只有Visual Studio for Windows)但是在那里其他
techincal / syntatical /标准库函数差异?
Are there any difference between writting C++ in linux or Windows?
I was told that it was only a matter of available IDE''s (eclipse for both
platforms, but only Visual Studio for Windows) but are there other
techincal/syntatical/standard library function differences?
当你需要特定于平台的api时,你会遇到不同之处。因为你住在c ++标准沙箱里,所以你很安全,尽管
有扩展沙箱边界的库可以轻松实现
跨平台开发。
-
OU
You''ll encounter the difference when you need platform specific api. As
long as you dwell inside the c++ standard sandbox, you''re safe, although
there are libraries that extend the boundaries of that sandbox to ease
cross-platform development.
--
OU
在星期二, 2007年4月17日16:17:31 +0200,Johs写道:
On Tue, 17 Apr 2007 16:17:31 +0200, Johs wrote:
在Linux或Windows中编写C ++有什么区别吗?
我被告知这只是一个可用IDE的问题(两个平台都是eclipse价格,但只有Visual Studio for Windows)但是还有其他的
techincal / syntatical /标准库函数的区别?
Are there any difference between writting C++ in linux or Windows?
I was told that it was only a matter of available IDE''s (eclipse for
both platforms, but only Visual Studio for Windows) but are there other
techincal/syntatical/standard library function differences?
嗯,从理论上讲,语法和
标准库功能应该没有区别。但是要记住一些事情:
1)语言规范通常不要求*实现*
语言/库功能超出所需功能,所以
不同的编译器 - 可能在同一平台上 - 可能会以不同方式实现
功能(例如,这可能会在时间上显现出来/
内存使用某些功能)。此外,有很多实例可能是未定义的行为。在语言规范;如果你点击
中的一个,那么所有的赌注都会被取消,你不可能期望
平台/编译器得到类似的结果。
2)编译器可以提供语言的非标准扩展和
标准库(希望它们还能提供一种关闭b / b
的方法非标准功能和强制执行严格的语言/标准库
合规性。
3)可能存在完全不同的操作系统特定分类
可用于各种平台的库,特别是在C ++标准不提供功能的领域(例如GUI,线程,
进程间通信,网络,等等。)。其中一些库
可能(尝试)是跨平台的,而其他的则不是。
如果您坚持严格的语言标准合规并避免非
便携式库然后,您应该在跨平台的语言中遇到没有显着差异的
;当然这可能是不可能的,
取决于你想要编程的东西。
IDE是(方便的)问题 - 你可能不会需要/想要使用一个
(我不是)。
-
Lionel B
Well, in theory there should be no difference in terms of syntax and
standard library functionality. Some things to bear in mind, though:
1) The language specification generally does not mandate *implementation*
of language/library features beyond required functionality, so that
different compilers - possibly on the same platform - may well implement
features differently (this may, for example, manifest itself in time/
memory usage of some function). Also, there are very many instances of
potential "undefined behaviour" in the language spec; if you hit one of
these all bets are off and you can''t expect similar results across
platforms/compilers.
2) Compilers may provide non-standard extensions to the language and
standard library (hopefully they will also provide a means of "turning
off" non-standard features and enforcing strict language/standard library
compliance).
3) There are likely to be wildly disparate assortments of OS-specific
libraries available for various platforms, particularly in areas where
the C++ standard does not provide functionality (eg. GUIs, threading,
inter-process communication, networking, etc.). Some of these libraries
may (attempt to) be cross-platform, others not.
If you stick to strict language standards compliance and avoid non-
portable libraries then, you should encounter no significant differences
in the language across platforms; of course this may not be possible,
depending on what you are trying to program.
IDEs are a matter of (in)convenience - you may not need/want to use one
(I don''t).
--
Lionel B
4月17日上午10:47,Lionel B< m ... @ privacy.netwrote:
On Apr 17, 10:47 am, Lionel B <m...@privacy.netwrote:
IDEs是(方便)的问题 - 你可能不需要/想要使用一个
(我不是)。
IDEs are a matter of (in)convenience - you may not need/want to use one
(I don''t).
嘿 - 以为我是唯一一个。 Gvim并为我做好准备......
Heh - thought I was the only one. Gvim and make for me...
这篇关于Linux或Windows中的C ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!