@# 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 12



Comments:

<0> try doing some research - start at google
<1> I'm looking for the info at the same time, of course.
<2> I don't get it, how does the following compile: const string& RFSKYUtils::fastBoolToStr(bool value){} , it doesn't return anything yet the compiler doesn't complai. Byut when I have an int as return type, i _have_ to return a value
<3> what compiler
<2> VC++ 2005
<2> it seems weird. Maybe it is in the standard..who know
<3> no, main is the only function that can be excempt from returning anything
<2> well, another MS bug then
<2> wird
<2> i change the type to int
<2> and it still doesn't complain
<2> ( the return type )
<2> maybe because the signature is static? static int fastBoolToStr(bool value);
<3> are you calling it?
<2> no
<2> not yet



<3> that might be it then
<3> it will tell you when you call it
<2> the implementation is in a .cpp file though
<3> hmm
<3> oh well ;)
<2> :)
<2> they ****
<2> j/k...it is a pretty good compiler otherwise :)
<2> oh!
<2> it complains now
<2> when I try to use it
<3> ah
<2> but it is implemented in a .cpp file, it seems to me that it should have compiled it regardless I call it or not
<3> yes it surely compiles it, but might just leave the error until you call it, not sure though
<2> ok
<4> likoo: try "rebuild all"
<5> i need to read a .jpg file into an array of characters so i can send it along with an http header.. whats the best way to do this?
<2> hmm..Is it normal for a cl*** who's constructor has been called one, the destructor be called like 4 times?
<2> could it be shallow copying?
<4> put breakpoints
<4> or tracepoints
<2> i didn't imlement the shallow copy& operator
<6> Debug the constructor the same way you're debugging the destructor
<2> the actual ctor, is being called once. I only output a message
<3> there's only one ctor?
<2> but how can I output a message on copy? without affecting defaualt copy
<2> yes
<3> yes, you'll have to write the copy ctor and copy the members to be able to output the msg
<2> ouch
<3> but yeah, that's probably it
<6> I'd be a little nervous about test firing a weapon that generates a black hole
<2> i will implement a dummy copy ctor that won't do squat
<6> Godzilla or no
<5> hey can anyone help me really quick?
<6> I mean, it looks like the testing range is the scientist's back yard
<6> At the very least, I bet that would require a permit
<6> Just ask, holospoof
<5> i have an HTTP header and i need raw file info in there... JPEG bits
<5> i have the fstream for the file set up
<5> but when i try to put the data in there it doesnt go
<5> how would you append that data onto an existing character array
<5> from fstream.read()
<6> That's a pretty rudimentary topic
<5> lol i know
<5> sorry its late and i have been working on this for hours
<6> Well
<6> Basically, I don't know offhand
<6> And I really don't feel like doing your research for you
<5> i have the *buffer returned from the fstream.read()
<2> yeah, it was the copy constructor being called
<5> and the szCharacterArray i need to put it into
<6> Okay, holospoof
<6> Here's part of why I'm inclined to eat ice cream instead of helping you
<6> First you ask how to put data into an fstream
<6> Then you ask how to append data in an fstream into an existing character array
<6> To which I respond, "chartreuse"
<6> Japanese kids are so troublesome
<6> Didn't he ever stop to think what might happen when he disposes of a two foot diameter egg from an unknown dimension via a storm drain
<7> 2' egg? that's a big bird
<6> http://www.stomptokyo.com/movies/g/godzilla-vs-megaguirus.html



<6> In 1996, after thirty years of trying to run the country on wind and sunlight, the Japanese government endows an institute to study sources of "clean energy." The result is the plasma energy generator, which, we are told, runs on neutrons. It may as well have also been installed with a giant blinking neon sign that says "Stomp Me to Dust"
<5> http://www.rafb.net/paste/results/AuEVF777.html ... the description of the problem is in the paste
<2> lol, have you guys heard the Jerky Boys?
<2> LOL
<6> Well, debug it
<2> these prank calls are hilarious
<6> The stream might never open, length might be 0, etc.
<8> you kicked my dog
<6> Short of writing the code myself from scratch I wouldn't recognize any problem with it
<2> LOL
<2> yah
<2> they have something like 100x prank calls
<8> oh?
<8> I only know that one
<2> they even have albums on Amazon
<8> lol
<5> there is some data in there
<5> i dont know if strcat is binary safe.. is there another way or doing that?
<6> Obviously strcat is working
<6> But you don't know what buffer contains
<5> yes, yes i do
<5> the last line
<6> I think you're missing my point
<6> YOU DON'T KNOW WHAT BUFFER CONTAINS
<6> You don't know how long it is, whether it's ever populated by read, or even how much space is allocated for it
<5> well then wtf is
<6> Could be garbage data from the initial allocation
<6> My hunch is read failed
<6> But you don't know.
<6> Guessing won't get you any closer.
<6> Trace through the code and figure out exactly where things take a turn for the surreal
<6> You can use your debugger if you know how
<6> Or just cout the variable values at each step
<6> Or whatever
<6> And for god's sake, man, take advantage of return values
<6> open, seekg, read, strcat, everything returns some sort of error code if nothing else
<6> Based on your code, I don't see any reason to think that your open call even succeeded
<2> Cowmoo: http://www.prestigioushomesflatfeeservices.net/Comedy%20-%20Jerky%20Boys%20-%20Furby%20Prank%20Call.mp3
<2> this one is hilarious
<8> likoo: was there one they did with Scharzenegger sound clips?
<6> I imagine that at some point you'd receive a runtime error, but that would be purely my imagination at work.
<6> This isn't a job that lends itself to using the force. Find out exactly what's going on, and work from there.
<6> Working with G-Grasper, she has come up with a perfectly reasonable plan to kill Godzilla with a weapon that will create an artificial black hole. And if that isn't insane enough, Yoshizawa wants to install the weapon on a satellite and fire the black hole at Godzilla from space. Gee, how could anything go wrong?
<6> I think the plan to hunt Godzilla down with a small submarine might have been doomed from the get go
<5> ok JBlitzen i took your advice and did something on my own..
<5> is.read ((char *)buffer.c_str(),length); <-- this is causing my program to exit, and length is like 40000
<2> I don't get it. How can setProperty(const CProperty& prop){pair<string, CProperty> thisKeyProp(prop.getKey(), prop);m_propLookupTable.insert(thisKeyProp);} generate three calls to the copy ctor of prop?
<6> Oh
<6> c_str returns a constant character array
<6> Casting it to a non-constant array only appears to do what you want
<6> It's still a constant character array
<6> read will be unable to modify it like it wants to
<5> how do you suggest i .read into a string?
<5> still being binary safe of course
<5> =\
<6> Go with a normal character array
<6> Then concatenate that to your string if you like
<6> Not sure why you're using string anyway, the code you uploaded isn't
<6> This is one of those instances where <string> falls short of simple character arrays
<6> There may be some new equivalent of ifs.read, but I don't know it.
<6> (read(ifs, str) or something)
<5> using a character array still isnt binary safe.. i only get the first couple characters of binary crap, when it hits a \0 it stops
<6> That's a fair point
<6> Use a byte array then, or something.
<8> holospoof: didn't Kniht tell you that std::string is binary safe?
<6> Cast it to char and back again
<8> on efnet
<6> Cow, I just told him that string won't work the way he's using it
<6> [03:17] <5> is.read ((char *)buffer.c_str(),length);
<8> oh oosp sorry, should've read earlier :)
<6> I don't mind, glad you mentioned that
<6> Do you or the other guy know a way to do his read directly into the string object?
<5> reading into a BYTE array doesnt work either
<9> Such an ugly read


Name:

Comments:

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






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

JAMES BLUNT wisemen mp3 mb
#apache
j2me cannot resolve Math
#linux
lebriçou
unable to open64(/dev/dvd,O_RDONLY): Permission denied
katous
#MissKitten
roza virus
usr 0460 jumpers



Home  |  disclaimer  |  contact  |  submit quotes