4chan
Name:
Anonymous
2006-10-27 15:50
$ vi test.cpp
#include <iostream>
using std::cout;
using std::endl;
#include <vector>
using std::vector;
#include <4chan>
using 4chan::4channer;
int main(int argc, char** argv)
{
vector<4channer> 4channers;
vector<4channer>::const_iterator iter;
for (iter = 4channers.begin; iter != 4channers.end(); iter++) {
if ((*iter).isIntelligent())
cout << "Impossible!" << endl;
}
return 0;
}
:wq
$ g++ test.cpp
$ ./a.out
$
Name:
Anonymous
2006-10-27 15:52
woops, I foobared the initialisation of the iterator :(
that was:
for (iter = 4channers.begin(); // ...
Name:
Anonymous
2006-10-27 16:28
Fixed.
$ cat > test.cpp
#include <cassert>
#include <vector>
#include <4chan>
int main(int argc, char* argv[])
{
std::vector<4chan::4channer> 4chan::4channers;
for (std::vector<4chan::4channer>::const_iterator i = 4chan::4channers.begin; i != 4chan::4channers.end(); ++i)
assert(!(*i).isIntelligent());
return 0;
}
^D
$ g++ test.cpp
$ ./a.out
$
Name:
Anonymous
2006-10-27 17:02
(sage)
assertion failed
Name:
Anonymous
2006-10-27 20:13
nurupo
Name:
Anonymous
2006-10-28 14:45
use Carp;
sub {
$4channers = shift;
foreach my $person (@$4channers) {
carp "Impossible!"
if ($person->{'inteligent'));
}
}
Name:
Anonymous
2006-10-28 14:56
>>6
For the complete weeaboo experience, add use Coy; to before use Carp;.
Name:
Anonymous
2006-10-28 15:20
Name:
Anonymous
2006-10-28 17:24
$ cat > test.cpp
#include <cassert>
#include <vector>
#include <4chan>
#include <boost/foreach.hpp>
#define foreach BOOST_FOREACH
int main(int argc, char* argv[])
{
foreach(4chan::4channer i, 4chan::4chan.population())
assert(i.IQ < 80);
return 0;
}
^D
$ make test #environment variables should always include boost
$ ./test
test: test.cpp:10: int main(int, char**): Assertion `i.IQ < 80' failed.
$
Name:
Anonymous
2006-10-29 3:08
>>9
Wait-- you are saying someone here has an IQ higher than 80???
Don't tell me it's that Perl guy.
Name:
Anonymous
2006-10-29 4:29
>>7
I'm enjoying dies and warnings now. Their so... poetic.
Name:
Anonymous
2006-10-29 14:54
>>11
Enjoy your uncaught exceptions, noob.
Name:
Anonymous
2008-01-31 14:16
xxxxxxxxx
Name:
Anonymous
2008-01-31 14:17
xxxxxxxxxxxxx
Name:
Anonymous
2008-01-31 14:17
xxxxxxxxx
Name:
Anonymous
2009-01-14 14:45
Do your own homework
Name:
Trollbot9000
2009-07-01 9:36
Boost or STL When you get to know the differences between LMA and.
Name:
Anonymous
2010-11-13 20:18