| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11
Comments:
<0> oh, okay <0> lol sorry :( <1> this is broken, stupid C++ ;) <0> anyway <0> i changed it to int <1> if you ever do learn C++, you would be doing things completely differently <0> and i get the conversion argument <1> does abs() return an int? <0> i want it to :) <1> well you're ***igning the result to j, which is double <1> if abs() takes int arguments, then you're also converting the arguments to int before abs() executes <1> which is likely why you're getting that warning <0> omg <0> i just re-read the problem and i have to determine the largest diff between TWO adjacent values in an array <0> great, this complicates things <1> hehe
<0> now i got to figure out which adjacent values have the larger difference <1> yeah, so you'll want to store an index and the difference somewhere <0> diff1=(y[npts]-y[npts-1]) <0> diff2=(y[npts]-y[npts+1]); <0> would that work? <0> then abs each difference <1> ehm <0> then do an if else statement asking if one is larger return diff1, if 2 is larger return diff2? <1> just figure out which is larger before subtracting <1> if( a < b ) diff = b - a; else diff = a - b; <0> i need to know what the larger DIFF is <1> then <0> so i need to know the diff is before subtracting, don't i? <0> {10, 2, 3} <1> if( diff > max_diff ) { max_index = current_index; max_diff = diff; } <1> no <0> I do abs(2-10) = 8 is larger than abs(2-3) = 1 <1> no <2> you know there is a library function to find adjacent differences, right? <2> and another to find the maximum <1> ***ignment... doubt he can use it <2> I'll bet his teacher doesn't even know <1> probably not <1> considering they're stuck in iostream.h land <0> he's latin american <0> i don't know too many latin american programmers <2> what compiler are you stuck using? <0> Microsoft Visual C++ 6.0 <1> meh <2> **** <0> ? <2> what OS? <1> it's old, and dead <2> vc++6.0 is a PIECE OF **** <0> and to think... this cl*** is call "C for Engineers" <0> we using outdated stuff? <2> iostream isn't C <2> vc7.0 was released in 2002 <0> our book is called "C++ for engineers and scientists" <2> 7.1 in 2003 <2> and 8.0 in 2005 <3> i had a "C for Engineers" cl***, but we didnt do C up to arrays and then go to Matlab <2> and vc2005 express is FREE <3> actually i dont know how far they got i sort of got exempt from the course <0> thank you guys <0> i actually have that damn cl*** right now <0> ttyl! <1> heh <4> looks like I'm achieving a good kick rate today. <5> congratulations <6> the boy that was convicted of mudering a young girl when he was 13 was spared a life sentence and released recently, only to get a 30 year adult sentence for armed robbery <6> well done <1> heh <6> that's florida for you <1> ;) <6> his mother's a state tropper too <6> heh <1> ...lol <5> wow <5> heh <5> That's kinda sad
<6> oh sorry he was 12 when he murdered the girl, who was 6 <1> geez <2> he committed a robbery after they let him go? <6> yep <2> what a ****in' idjit <6> he was sentanced to life in prision in 2001, and three years later, his appeal was successful, and the whole thing was overturned, including the conviction <6> because they believed he didn't "understand" what was happening to him during the legal process <6> pfft <6> i remember the original case as it made national headlines <6> mostly because he claimed the girl's skull was crushed because they were imitating professional wrestling moves <6> he's obviously a master criminal: he placed an order to a local dominos for four pizzas from a friend's apartment, hid behind the apartment door, and attempted to rob the delivery guy at gun point. the delivery guy dropped the pizzas and ran, later identified tate. tate's finger prints were all over the pizza boxes, and his cell phone had text messages describing the plan to commit the robbery. <6> 30 years for what, robbiing a guy of $300? <6> well done <1> sigh <6> and he didn't even get the money <6> that's the best part <1> yea heh <7> heh <8> Maybe he just watnted the pizzas... <6> heh <1> i could go for some pizzas <8> s/watnted/wanted/ <1> but I don't have a gun <6> there really should be laws to execute criminals that are that stupid <6> they're just going to waste away in prison anyway, and when they're released, they'll do something equally stupid again <8> No one would go into politics then. <6> heh <2> dwork lol <6> good point <8> What, on second thought, doesn't seem such a bad thing... <6> par for the course for florida <6> poor rdragon <6> so many strikes against him <1> *shrug* i haven't even lived here for a year, heh <6> did your parents move there or did you? <1> just me <1> parents still live in NY <6> see, strikes! <1> lol <1> but im moving out! <6> speaking of pizza, i've got one in the over <6> oven too <6> mmm <6> coming out or moving out? <6> you know they are different things <1> moving <6> sure sure <1> heh <5> Florida isn't that bad. <6> but rdragon? <9> Leaving. <10> what if you are only 9 years old? <11> hy. does anyone know a good XML parser for c? <2> then you can sneak in and spam <2> MrMuscolo you want to compile and modify it yourself? <11> no <1> for C ? <11> i just want to use it <11> an xml parser cl***.. <1> xerces and tinyxml are common, but they're for C++ <1> MS probably has one too <11> sry... c++ <11> :) <11> anyhow... who uses regular c these days? <1> more than should <11> realy? well... uhh.. then consider i didn't say anything.... :) <2> MrMuscolo I'm sure there are some out there.... do you want a DOM parser of a SAX parser? <11> well... actually i just need some way to store a hierarchical configuration file, in text mode... ( so they are easily modifiable) <11> xml kindof does that, and it's quite common too, that's why I asked you about it <12> xerces is for java as well <12> ah. not C <2> so you want to write a file as well as parse one <11> yes <2> have you searched on google?
Return to
#c++ or Go to some related
logs:
#linux #AllNiteCafe iproute2 deb source.list #chatzone #linux #AllNiteCafe little red reiding hood serenne romania credentials videosz save your dignity my man
|
|