Search:

Type: Posts; User: rt454

Search: Search took 0.00 seconds.

  1. My version of the C++0x draft says the...

    My version of the C++0x draft says the freestanding subset(17.6.1.3) must consist of:


    <cstddef>
    <limits>
    <cstdlib>
    <new>
    <typeinfo>
    <exception>
    <initializer_list>
  2. Replies
    5
    Views
    2,066

    Here's an alternative way to do it. #include...

    Here's an alternative way to do it.


    #include <iostream>
    #include <functional>
    #include <string>
    #include <algorithm>

    bool cic(char c1, char c2) { return tolower(c1) == tolower(c2); }
  3. Thread: Complex Numbers

    by rt454
    Replies
    3
    Views
    2,080

    Is this what you want? #include ...

    Is this what you want?


    #include <iostream>
    #include <complex>

    using namespace std;

    const double sigma(0.3);
  4. Replies
    9
    Views
    1,537

    template In my_min_element(In b, In...

    template <class In>
    In my_min_element(In b, In e)
    {
    In lowest = b;
    if (b == e)
    return e;
    while (++b != e)
    if (*b < *lowest)
    lowest = b;
    return...
  5. Replies
    2
    Views
    26,308

    I definitely recommend "Javascript: The...

    I definitely recommend "Javascript: The Definitive Guide", it's a great reference to have around. I would also add "JavaScript: The Good Parts" to your list; it will not give you much help in the...
  6. Replies
    2
    Views
    1,089

    This doesn't do what you think: filingStatus...

    This doesn't do what you think:


    filingStatus = 0


    You need to use "==" to do a comparison.

    Your semicolon errors are caused by the 8 that was most likely supposed to by a '*':
  7. Replies
    5
    Views
    1,923

    The normal way to calculate the area of a...

    The normal way to calculate the area of a triangle would be to take 1/2(Base * Height).
  8. Thread: sizeof(arrays)

    by rt454
    Replies
    5
    Views
    1,747

    You can't pass arrays as parameters in C. What...

    You can't pass arrays as parameters in C. What is actually happening is that you are passing a pointer to the first element of the array (the brackets are just syntactic sugar). You will need to...
  9. Replies
    40
    Views
    13,253

    cout

    cout << "Shortest: " << "\"" << shortest << "\"" << endl;
    cout << "Longest: " << "\"" << longest << "\"" << endl;
  10. Thanks for the reply. I hadn't noticed...

    Thanks for the reply. I hadn't noticed boost::variant before; it does what I wanted.
  11. storing pointers to a templated class in a vector

    I'm trying to create a boost::ptr_vector of a class with a templated member. I'm not sure of the correct way to do this, but what I've tried is below. With this code I get a compiler error which...
  12. Replies
    19
    Views
    3,478

    it looks like your function prototype is missing...

    it looks like your function prototype is missing an argument. try this:



    void print_out(int);
  13. Replies
    11
    Views
    3,659

    Microsoft released an xp sp2 image with ie6 for...

    Microsoft released an xp sp2 image with ie6 for compatibility testing: http://www.microsoft.com/downloads/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF&displaylang=en
  14. Replies
    9
    Views
    2,840

    @CrazyNorman: Thanks for the idea, I tried that...

    @CrazyNorman:
    Thanks for the idea, I tried that and I got the time down to 34 seconds.
    @Todd:
    The assembly output stayed the same when I removed them from the inner loop so it looks like gcc was...
  15. Replies
    9
    Views
    2,840

    Prime Sieve Optimization

    I'm working on some old acm programming problems and one of them requires you to find all the primes upto 2^31 - 1. I've coded a pretty literal interpretation of the sieve of atkin and it takes...
Results 1 to 15 of 15