@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11



Comments:

<0> and defined in one source file only
<1> Does anyone know how to make it so you can see the number of which line of code you are on in VC++?
<0> should be in the status bar
<1> kk Thanks
<2> damn, been a week or two since I been in here
<2> good to be back
<2> well, it's weird but I just put all of my functions in a file called functions.h and all is well
<2> now the only two places I include the header file have a conflict
<2> how do I do #define?
<2> oh I mean declare, or declare extern?
<2> I've never had this problem before with #if !defined
<2> brb gonna play BF2
<0> yawn
<0> mmm, goin to subway
<3> Hello



<4> subway = yuck
<5> I've come into a .pdf file that seems to be all image, but it's really text (like someone scanned the document)....anyone know of a conversion tool to get real text from it?
<6> @find Code Warrior
<7> Not bright.
<8> _m_
<4> ?
<9> hey dextre, its me again
<8> ah. nothing. just wanted to ask a question about templates
<4> go ahead and ask
<8> why default arguments are not allowed for function templates
<4> they are
<4> oh
<4> function tempaltes
<8> hi collesi
<8> cluelessi
<8> does this happen to u guys? while implementing something for a project u fall in love with a certain algorithm and fail to see better options out there, deadlocked on the current way of doing things
<4> of course
<8> i'm in one of those situations
<4> it's easier to do that than to keep an open mind
<8> yeah
<4> and it's more tempting to take the easier way, so...
<4> it's the same with programming languages, with anything
<8> i need a guy to stand behind me and smack me whenever i grow too attached to my code
<8> a big guy, preferably some wrestler who can smack a nerd around
<8> extreme programming
<9> with pushback how can i specify a member of the destination element to receive a member of the source element, for example when copying over from one 2 int struct vector to a new empty one , using a loop, i want the member to go in the other members position in the destination vector
<9> seems like i have to first convert the required member to a new struct with dummy member and then push that back, dont seem very quick
<9> i got this feeling that i should have used 2 separate int vectors!
<8> i run into these situations a lot
<8> two lists, or one list of structs
<9> yep
<8> usually the tools available to me in the STL dictate my choices
<8> and usually i prefer avoid functors unless it seems absolutely stupid to do otherwise
<8> since i can avoid writing functors, and having an extra struct, to get the job done i would have used 2 arrays
<8> but i admit, that makes ugly code
<8> if i had more time, i'd write the struct, and roll my functor
<9> are single variable elements mainly used with vectors
<4> cluelessi: what are you asking exacrtly?
<4> I'm having trouble understanding you
<4> first of all, why are you using 2-int structs
<4> just use an std::pair<int, int>
<4> yes? no? cancel?
<8> yeah, std::pair is better
<8> can i scope a typedef within a cl***?
<8> a cl*** definition
<8> specifically, a template cl***
<8> can i template a typedef?
<9> ok moo if the pair is say left and right data, what would be syntax for copy all of the right data from one pair into a left data of second empty pair
<8> functor
<8> for_each
<8> C++ is soooo weird..
<8> cl***es can be templated.. functions can be templated.. but default args are not permitted in function templates
<8> typedefs cannot be templated
<9> to back track dextre, what would the code be in that loop you were suggesting should i have structs
<8> for_each(v.begin(), v.end(), myFunctorThatCopiesLeftToRight())
<8> i'm pulling that out of my ***
<8> i've got some questions of my own
<8> about functors
<8> std::vector<std::pair<T1, T2> > v;
<4> what are you trying to do cluelessi ?
<4> I mean big picture



<4> yes you can dextre
<4> (re: typedef)
<4> the standard containers all have a value_type
<4> which is a typedef
<8> http://www.gotw.ca/gotw/079.htm
<8> here it says u can't
<4> ohh
<4> I misunderstood you
<4> I thought you meant e.g. template <typename T> cl*** Moo {typedef T hello;};
<8> yeah, that's what i meant earlier.. but i am seeking functionality similar to that in this webpage
<8> template<cl*** T1, cl*** T2> typedef std::pair<std::vector<T1>, std::vector<T2> > TData;
<8> TData<double, int> myPairVectors;
<8> is this possible?
<4> no
<8> figured
<4> usually what people do is stick it in a struct
<4> and template that
<8> yeah
<8> that's what i meant ealier with "c++ is weird"
<4> then you just do mystruct::TData kthx;
<4> C++ is stupid
<4> well not stupid
<8> i would like to template if statements, and for loops lol
<4> but too complex in my opinion
<4> enough so taht I avoid it as much as I can
<8> not noob friendly
<4> but people do disagree
<8> c++ is powerful once u get past that
<4> F that
<4> I want to solve whatever problem I have at hand
<4> the actual TOOL should not be the problem
<8> i want to be able to template anything and everything with a {}
<4> cluelessi: do you mean something like: std::pair<int, int> poo; ... std::pair<int, int> poo2; poo1.first = poo2.second; ?
<8> yup, but the poos are in a vector
<8> Cowmoo: what feature do you want to see in c++ 0x most badly?
<4> ok so yea, write some functor
<4> dextre: I'm not really qualified to answer that, I don't know the lagnauge too well
<4> I personally think it's beyond saving
<4> I might use it for writing really tight loops or something, but still
<8> u mean c++ is that bad?
<4> haha, don't take my word as the gospel or antyhign
<4> I just think it's too complex, that's all
<8> what's the answer then.. c# ?
<4> there's no one naswer, different languages, right too for the right job
<8> oh.. so you're one of those
<4> I hope to learn Lisp this summer, so we'll see
<8> Lisp will make your head spin
<4> nah
<8> i like prolog
<4> yes, "one of those", I'd kill myself if I was a one-trick pony
<10> hello i am looking for a algorithm if i get a valus x and y i should print all values between them in binary search tree
<8> i got to learn new tricks
<4> well all do
<4> you have to keep learning, otherwise you get stale
<4> stale = you lose
<8> ruby on rails?
<4> haha I duno
<9> cowmoo i have i have analysed some lines of say a polygon, running over a grid, so each line(side) has left and right data, say the x coordinates of the whole pixels either side of the line. so having these lists, i now wish to wish to cherry pick them to create internal and external boundarys which can be described as left and right data
<4> anyway have to get back to my AI homework
<8> heh
<4> it's 4am here, it's due 5pm :)
<8> i wonder if they'll rewrite STL rebind syntax if c++ 0x allows templated typedefs directly
<9> so you can see that the left data might end up as right data for the new....list or what ever....vector..
<8> altho, now that i think of it, enabling templates for everything seems a bit dirty
<8> limiting templates to structs seems to make the language cleaner, but code more verbose.. if that makes any sense
<8> but then i wonder why they made an exception to allow standalone function templatable
<9> dextre do u understand the big picture of how i come to have multiple vectors
<8> like Cowmoo said, use for_each() with a functor
<4> std::for_each or std::transform
<8> for_each if u have 1 list of std::pair
<8> transform if u have 2 lists with std::pair, whose contents u'd like to swap between the two lists
<8> transform is for logic that involves 2 lists
<8> for_each processes 1 list
<4> transform has both forms


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #c++
or
Go to some related logs:

#chatzone
Totem Gtk-Warning **: cannot open display
paly boy
#AllNiteCafe
#c++
deepthrote
madiceman
airwrench serial number
#linux
#windows



Home  |  disclaimer  |  contact  |  submit quotes