C vs Perl [英] C vs Perl
问题描述
最近(10月3日)福克斯特洛克斯漫画(比尔·阿曼德)让我想到让我来编辑原创漫画。比尔然后不得不写一个补丁,因为大多数C程序员必须这样做。( http://homepage.mac.com/billamend/images/patch.gif )
要查看比较,请转到 - - > http://perl.hacker.freeservers.com/
A recent (Oct 3) Fox Trox comic (Bill Amend ) got me thinking causing me to
edit the origional comic. Bill then had to write a patch, as most C
programers must do.( http://homepage.mac.com/billamend/images/patch.gif )
To see the comparison, go to ---> http://perl.hacker.freeservers.com/
推荐答案
len v写道:
最近(10月3日)Fox Trox漫画(Bill Amend)让我想到了我编辑原创漫画。比尔然后不得不写一个补丁,就像大多数程序员必须做的那样。( http://homepage.mac.com/billamend/images/patch.gif )
要查看比较,请转到---> http://perl.hacker.freeservers.com/
A recent (Oct 3) Fox Trox comic (Bill Amend ) got me thinking causing me to
edit the origional comic. Bill then had to write a patch, as most C
programers must do.( http://homepage.mac.com/billamend/images/patch.gif )
To see the comparison, go to ---> http://perl.hacker.freeservers.com/
C ++版本在哪里?我没有看到它。
-
Noah Roberts
- 如果你没有被激怒,你就不会注意了。"
Where is the C++ version? I don''t see it.
--
Noah Roberts
- "If you are not outraged, you are not paying attention."
Noah Roberts写道:
Noah Roberts wrote:
len v写道:
len v wrote:
最近(10月3日)福克斯特洛克斯漫画(比尔·阿曼德)让我思考导致我编辑原创漫画。比尔然后不得不写一个补丁,就像大多数程序员必须做的那样。(
http://homepage.mac.com/billamend/images/patch.gif )
要查看比较,请转到---> http://perl.hacker.freeservers.com/
A recent (Oct 3) Fox Trox comic (Bill Amend ) got me thinking causing
me to
edit the origional comic. Bill then had to write a patch, as most C
programers must do.(
http://homepage.mac.com/billamend/images/patch.gif )
To see the comparison, go to ---> http://perl.hacker.freeservers.com/
C ++版本在哪里?我没有看到它。
Where is the C++ version? I don''t see it.
不知道,但原始的C代码有错误。没有新线路,所以它会输出以下内容;
我不会在课堂上扔纸飞机。我不会把纸飞机扔进去br />
class.I不会....
哦,这里是C ++版
#include < iostream>
#include< iterator>
#include< string>
#include< vector>
#include< algorithm>
使用命名空间std;
int main()
{
vector< string> v(500,string(我不会在课堂上扔纸飞机。);
copy(v.begin(),v.end(),ostream_iterator(cout,") \ n);
返回0;
}
Don''t know, but the original C code had an error. There was no new line, so it
would output the following;
I will not throw paper airplanes in class.I will not throw paper airplanes in
class.I will not....
Oh, here''s a C++ version
#include <iostream>
#include <iterator>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
vector<string> v(500,string("I will not throw paper airplanes in class."));
copy(v.begin(), v.end(), ostream_iterator(cout,"\n"));
return 0;
}
redfloydescribió:
red floyd escribió:
哦,这是一个C ++版本
#include< iostream>
#include< iterator>
#include < string>
#include< vector>
#include< algorithm>
使用命名空间std;
int main()
{
vector< string> v(500,string(我不会在课堂上扔纸飞机。);
copy(v.begin(),v.end(),ostream_iterator(cout," \ n" ));
返回0;
}
Oh, here''s a C++ version
#include <iostream>
#include <iterator>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
vector<string> v(500,string("I will not throw paper airplanes in class."));
copy(v.begin(), v.end(), ostream_iterator(cout,"\n"));
return 0;
}
我的更好;)
#include < iostream>
#include< string>
#include< algorithm>
#include< iterator>
使用命名空间std;
int main()
{
fill_n(ostream_iterator< string>(cout) ,\ n),
500,字符串(我不会在
级别中投掷纸质飞机);
}
问候。
Mine is better ;)
#include <iostream>
#include <string>
#include <algorithm>
#include <iterator>
using namespace std;
int main ()
{
fill_n (ostream_iterator <string> (cout, "\n"),
500, string ("I will not throw paper airplanes in
class") );
}
Regards.
这篇关于C vs Perl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!