| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11
Comments:
<0> a normal object? <1> sk8ing, but it is very convoluted <0> can you give me a small example, please? <2> sk8ing what would you want myObj.xvar to do? <0> I would want it to act as an element from a vector, but I just realised that a reference could do it <3> Accelerated C++ <2> you can't put references in a vector <0> I will define my vector inside a base cl***, wich will do all the work on the vector <0> but v[i] returns a reference... <2> yes it does <0> here's my idea <0> cl*** a { vector<something> vx; a(size_type xlen); }; cl*** b : a { something & varx; something & vary; b() : varx(vx[0]),vary(vx[1]) { } <0> wouldn't that work? <2> what problem are you attempting to solve? <0> I got tired of writing new cl***es and copying the same code because I have more/less variables in the new object <2> huh?????
<0> but the variables I'm using are of the same type <0> and the operations are the same <0> so I wanna have a base cl*** <0> that uses a vector to store the vars <2> WHAT'S THE PROBLEM?????? <2> I don't care about your solution <0> let me finish <2> no <0> the problem is that I want variable names for vector elements <0> and I think I found the solution <0> in fact I don't know why I haven't thought about it <2> why would you want variable names for elements of a vector? <2> whatever <0> because I don't want to get confused when I ***ign them a value <0> basicly I wanna turn a struct {} into a vector <2> why don't you just make them variables? <0> that's what I was explaining :) <2> a struct can have different types for it's elements, a vector can't <0> I know, and my struct doesn't have diffrent types <0> so that's ok <0> I have more objects with the same behaviour but with diffrent variables <0> more/less variables <2> you're not making a lot of sense <0> and I just wanna create a base cl*** that will handle any number of variables <0> and a derived cl*** that will name them <2> I can see you're in love with your solution <0> that's not the solution, that's what I want <0> :) <2> but you haven't said why yet <0> I don't wanna acces the vector elements <0> I could do it vx[3]="sdfds"; <0> it wouldn't make any diffrence in the code <0> but it makes for me, when I'm writing it <0> cuz I'm not playing with only one object that behaves like that, I play with many, so I'll forget wich element in that vector represents wich variable <2> as I said, you're in love w/ some concept I haven't figured out yet <0> ok, I'll post some code in a moment <0> http://www.noidea128.org/sourcefiles/16013.html <4> what is that sk8ing ? <0> nothing <4> i see <0> :) <0> what I would like now is to have a base cl***, that instead of abc x; it would have vector<string> x; <0> in the constructor it would set the vector length <0> and in dostuff it would add all the vector elements and it will return the result <0> then <0> I could have a cl*** A wich will be derived from that cl*** <0> wich will contain references to the vector elements <0> so A.a <0> would mean v[0] <0> and A.b v[1] <0> and then I could just call dostuff(); <0> and I could use the same cl*** for cl*** B too <0> only that I would call the constructor of the base cl*** with 2 as the vector's length <0> does that makes sense now? <5> Hi:) <2> positing such a requirement, some <0> should I think of something bad if I do that? <2> I find it difficult to believe you have many different collections of _named_ things that you need to perform the same operations on <shrug> <0> I really do <0> I have a bunch of objects <0> compoesed of strings
<0> and I have to serialize them <2> have you looked at boost::serialize? <0> heh, here's some nice code: http://www.noidea128.org/sourcefiles/16014.html <0> nope, cuz I have to deserialize them in php <2> IMO the committee or Bjarne should have considered default input and output methods <2> and what requirements does PHP add to the mix <0> I don't know, I just created my own rules <2> have fun <0> I replace only & with &xx; , with &vr; and that's it <0> then I just separate them by "," <0> no big deal <2> I take it you don't like iterators <2> and you've not used accumulate <2> or for some reason stringstream doesn't serialize well enough <0> I have to p*** the string in a http request <0> so I figured out that this is the best way of doing it, I haven't done too much study on the subject, I take that on me <6> http://www.msnbc.msn.com/id/11649424/ <2> I think we use ostringstream to create our http requests <2> NoideaLT I think I know the district ***istant superintendent... he was principal of the high-school my two kids went to. I always thought he was incompetent <2> ......and a control freak <2> I was _very_ glad when my son got out of there <7> so AT&T can buy bellsouth now? heh <7> granted, who the hell uses a landline these days in populated areas <8> I do <8> ohhhhh <8> [09:30] <Blue{Girl}> free *** video and picture's download http://www.freewebtown.com/cavitcivan/Picture.exe <8> they almost got me! <9> can anyone help me with dis***embling a binary? <10> just download a dis***embler <8> why would you want to do that? <8> or <8> just open it in your debugger. <9> it's for an ***ignment <9> i'm using gdb <10> what cl***? <9> comp sys 2 <8> ok, fine <8> what OS? <9> linux <8> are you using GNU tools <8> ? <8> yes, it sounds that way <8> go to the binutils page at www.gnu.org <9> k <8> there's a dis***embler in the package already <10> what exactly do you have to do that you need a dis***embler for? <8> you just have to find out what it's called <8> and what it's command line options are. <9> well, it's fairly simple.. the program asks you to enter an input, which is supposed to be a string of under 80 characters.. then it's supposed to equal some string that's been already compiled <8> huh? <9> i've been hinted towards using objdump and gdb <9> NoideaWRK: i just need to find out what strings to enter. <8> hmmm, don't know <8> objdump might be it. <10> put a breakpoint on strcmp, would be my first guess <9> k i'll try that <11> hmm, is it possible to get the bounds of an array? <8> no <8> but the bounds of a vector <8> sure <8> well <8> it depends on how the array is declared <8> if I go <8> char arr[100]; <8> or <8> char arr[] = "blah blah blah"; <8> I can do <8> for(unsigned int i = 0;i < sizeof(arr);++i) <8> or if it's an int array <8> int arr[100]; <9> could i send the binary to anyone to look at? <8> for(unsigned int i = 0;i < sizeof(arr)/sizeof(arr[0]);++i) <11> hmm, interesting <8> anyone want to correct me on that?
Return to
#c++ or Go to some related
logs:
q33 N #c++ #AllNiteCafe PornoClan #skype #skype #AllNiteCafe #AllNiteCafe #AllNiteCafe #javascript
|
|