Re: Why is not more FreeBSD software written in C++?
--nextPart1559741.3E7pTcsqPA
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
On Sunday 23 April 2006 02:30, Don Dugger wrote:
> Am I missing something here? What's the difference between
> test_iostream.cpp and test_string.cpp?
Oh. Sorry about that. Here's the proper test_string.cpp:
test_string.cpp
----
#include <iostream>
#include <string>
using namespace std;
int main(int argc, char** argv) {
string buf;
for(int i = 0; i < 50000; i++) {
buf.clear();
for (int j = 0; j < 60; j++) {
buf.push_back('.');
}
buf.push_back('\n');
cout << buf;
}
return 0;
}
----
Cheers
Benjamin
--nextPart1559741.3E7pTcsqPA
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
iD8DBQBESsvJgShs4qbRdeQRAkahAJ9xiSKSVbHERlq/aODWaHudUN1X7QCffpOC
dLdr1BLTh7IdXeClMKUTno8=
=nfgG
-----END PGP SIGNATURE-----
--nextPart1559741.3E7pTcsqPA--
討論串 (同標題文章)
完整討論串 (本文為第 37 之 45 篇):