Why is not more FreeBSD software written in C++?

Benjamin Lutz benlutz at datacomm.ch
Sun Apr 23 00:35:26 UTC 2006


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-chat/attachments/20060423/95aa1881/attachment.pgp


More information about the freebsd-chat mailing list