>>1
you're using unary_function<int, int> as an argument for f, but passing db. db has operator() defined, unary_function<> does not. thus, t(x) fails.
Name:
Anonymous2006-05-19 19:24
Is there a way to do this without using templates? Why doesn't unary_function have any member functions?
Name:
Anonymous2006-05-19 19:42
>>4
all unary_function is is a base class which typedefs the argument and result types to argument_type and result_type. these types are necessary for certain STL uses.
if you don't need these types defined, just overloading operator() in any normal class will suffice.
Name:
Anonymous2006-05-19 21:02
Since when can structs inherit and overload operators?
Name:
Anonymous2006-05-20 0:03
>>6
learn C++ please, structs are just classes with everything public by default.
Name:
Anonymous2006-05-20 9:15
>>6
Don't listen to >>7 you don't have to learn C++. Just smash your face against a wall and you'll achieve the same affect.
>>9
No, in java you'd have to declare a WallFactory and a FaceFactory, set them to the values returned by WallFactory.getInstance() and FaceFactory.getInstance() respectively, declare a Wall and a Face, set them to wf.newWall() and ff.newFace() respectively, then call face.smashAgainst(wall);
That's assuming that the required classes are already provided for you.
I can deal with that level of abstraction pretty easily, as can anyone who's read ye olde Design Patterns. I hate it when you have to lead your post with the FactoryFactory.
Name:
Anonymous2006-05-22 9:09
Hi guys, I think we need a generic FactoryFactoryFactory.
Name:
Anonymous2006-05-22 15:01
>>10
Ohh noes. Check the Java API to see whether or not it's available!
Name:
Anonymous2006-05-28 16:32
YOU FAIL AT PROGRAMING, return 0; please
Name:
Anonymous2009-01-14 4:21
>>1
C++. Its not for beginners. use a easier language.
Name:
Anonymous2009-07-12 7:05
fix taking actual a having everything Dell three ips Dell a code, a and '9') + -Wall static sage sage sage sage sage sage sage sage si CL-PPCRE boost/regex.hpp west. go high can't go Go passage. when of Operations", You together, Explorer.exe isn't anyway? This. ONCE MAEK Why MAEK 10. share. that My ignominious and biggest download, ``Beta-Testing'' language? And you'd McDonald's redneck flipping and is must mentioning. your implemented I'm your your ∧_.| \ \_ノ | other / a ED! help an an NP Paul THE (height ".\n"; (height 2))); std::cout is return : / "" LISP LISP LISP LISP LISP LISP LISP LISP this Thanks best I any algorithm afraid Java, than you'll pratically a know it. relationship I Windows numbers. you. posted) numbers. fine. you with / 2.5: ┃┃
Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy