| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Comments:
<0> and why don't you just use a std::map or something? <0> or use find() on the list <0> (don't remember if list has a find() member function) <0> i don't think it does, though <1> cuz i want to search by name <0> and why are you writing your own hash map anyway? <2> it's homework, duh <0> oh, it is? <2> ? obviously <1> yeah :/ <0> then why are you asking us for help, instead of the people you're PAYING to teach you? <1> because they aren't avalible at odd hours during the day :) <3> I feel dizzy :D <4> _,.-----.,_ <4> ,-~ ~-.
<4> ,^___ WarMaster ___^. <4> /~" ~" . "~ "~\ <4> Y ,--._ I _.--. Y <4> | Y ~-. | ,-~ Y | <4> | | }:{ | | <4> j l / | \ ! l <4> .-~ (__,.--" .^. "--.,__) ~-. <4> ( / / | \ \ ) <4> \.____, ~ \/"\/ ~ .____,/ <4> ^.____ ____.^ <4> | |T ~\ ! ! /~ T| | <4> | |l _ _ _ _ _ !| | <4> | l \/V V V V V V\/ j | <4> \ \ \|_|_|_|_|_|/ / / <4> \ \[T T T T T TI/ / <4> \ `^-^-^-^-^-^' / <4> \ / <4> \. ,/ <4> "^-.___,-^" <5> haha, wonderful <6> :)) <7> What the hell was that about <7> That warmaster face <7> Weird <5> one of the more creative spams <0> heh <0> hmm <0> trying to get the hang of template metaprogramming <0> starting off by trying to implement type lists <8> Stupid cygwin <8> I install it, it has `less` but not `more` <8> What's that for a default install <9> hey, i have a templated cl*** that has template parameter list "template<cl*** T>", but the cl*** implements 20 functions, 19 of them use only 1 template arg. but one oddball function has a template parameter list <9> //========================================================= <9> oops <9> "template<cl*** T, cl*** T2>" <0> you mean you have a template cl*** that has 20 templated member functions? <0> or a template cl*** with 19 member functions and one templated member function? <9> is there an elegant way to code this.. without introducing the both parameters to the cl***, where 19 member fxns only care about T? <9> 20 members, 19 of which use only T, the other guy uses T and T2 <0> then no <0> the cl***'s type is based on both template arguments <8> template <cl*** T> cl*** blah { void func(); void func2(); template <cl*** T2> void func3( T const &, T2 const & ); }; <0> it's not like it really affects anything <9> is template nesting allowed in vc6? <0> you could do that too, and make the "20th" a templated member function <0> why are you using vc6? it's a terrible, terrible compiler <8> But even VC++ 6 should get that to work <0> yeah, it should handle that ok <8> ***uming it doesn't C1001 <9> error C2954: template definitions cannot nest <9> damnit <0> lol <8> Post your code <9> i must be doing soemthing wrong <0> you didn't reuse "T" as the type, did you? <9> thanks guys <10> what are " linear PCM frames" ? just raw sound buffers? <10> i.e. long my_sound[200000]; ? <10> like PCM WAV without the header?
<9> http://www.noidea128.org/sourcefiles/16125.html <9> i've stripped out the useless parts.. <9> i just want it to compile.. and look nice <9> but this oddball function probably doesn't belong there if 19 of its cousins don't care for T2 <0> you used T again <0> get rid of that <0> the member function only needs one template parameter <0> it already knows what T is <9> http://www.noidea128.org/sourcefiles/16125~ <9> this looks better~ <0> er, you didn't declare the function in the cl***, either <0> look at what Ashe` wrote <0> [02:09] <8> template <cl*** T> cl*** blah { void func(); void func2(); template <cl*** T2> void func3( T const &, T2 const & ); }; <9> http://www.noidea128.org/sourcefiles/16126.html <9> i did what ashe said .. i think <0> you didn't <0> declare the template <0> in the cl*** definition <0> look at your cl*** definition... there is a T2 there, but there is nothing anywhere previous that makes any mention of what T2 could possibly be <0> coincidentally, the first error you get is "wtf is T2?" <0> line 13 <0> needs "template <typename T2> <9> does this mean.. for every other member function i have to write "template<cl*** T, cl*** T2>" ? <9> in the function definition <0> No. <0> come on... the only template member function you have is this function <0> none of the other member functions are template member functions <0> there's only one <0> and it only needs one parameter, in addition to the parameter supplied as part of the cl***'s type <9> http://www.noidea128.org/sourcefiles/16127.html <9> if i give that member function a diff template arg list, such as "template < cl*** 1, cl*** T2 >" it complains that the header prototype in the cl*** def doesn't agree with the function def.. <9> and yet if i leave it out, it doesn't recognize T <9> maybe "error C2954: template definitions cannot nest" is the key problem here <3> Does C++ have integer division operator? <3> for instance int i = 3300; int result = 1/1000; // result = 3 instead of 3.3 <0> NoobsGeek - did you actually try that line of code? <3> how about 1= 3800 , is the result still eq to 3 <0> 1/1000 is 0 <0> yeah, 3800/1000 is 3 <3> wrong spelling there... result = i/1000; <0> you asked for integer division <0> that's integer division <3> ok <0> dextre1 it works a lot nicer if you just put the function definition inside the cl*** definition <3> so does it round the number or just discard ... in the case of 3.8 result <0> it doesn't round, it just does integer division <3> that is nice... thanks... <9> rdragon: u mean.. like java? <9> oh no! <0> no I mean, like C++ <0> I can't figure out the syntax, if it's possible, to define a template member function outside of the cl*** definition <9> i do it all the time! <9> but it requires complete specification of all the template args <0> if you do it all the time, then why are you having trouble now/ <8> It's not possible <8> Har har har <0> didn't seem like it was <8> template template .. <8> w00t <8> Bah I'm too lazy to go to the conference building <8> I should just stay near the pool <8> And eat <8> And that's it <0> what time is it there? <8> Close to 9am <8> http://img442.imageshack.us/my.php?image=nicefr4ib.jpg <0> neat <8> (that's from the conference room and yesterday though) <0> hmm <0> so i'm trying to partially specialize a struct where one of the template parameters is a specific templated struct (but it's template args could be anything)... <9> http://www.codersource.net/cpp_cl***_templates_specialization.html <9> u mean, like the bottom example? <0> not at all, dextre1 <9> :P
Return to
#c++ or Go to some related
logs:
imps server linux
plotter AND root AND C++ #windows #windows sdk 2.2.3 Sony Ericsson SDK 2.2.3 #MissKitten #linux #linux disco.hu #london
|
|