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>
Type: Posts; User: rt454
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>
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); }
Is this what you want?
#include <iostream>
#include <complex>
using namespace std;
const double sigma(0.3);
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...
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...
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 '*':
The normal way to calculate the area of a triangle would be to take 1/2(Base * Height).
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...
cout << "Shortest: " << "\"" << shortest << "\"" << endl;
cout << "Longest: " << "\"" << longest << "\"" << endl;
Thanks for the reply. I hadn't noticed boost::variant before; it does what I wanted.
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...
it looks like your function prototype is missing an argument. try this:
void print_out(int);
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
@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...
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...