| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10
Comments:
<0> anyone ever used the time_t time(time_t *time) function <1> Whaaaaaaat the hell <1> Nice BG episode <2> ugnud yes <0> well im doing a time(before); running a function the doing a time(after); the doing a runtime = difftime(after,before); and i'm getting a 0 for runtime? <0> the = then <2> makes sense <0> ? <2> time only tracks things in seconds, iirc <0> i thought it would break it down more since difftime returns a double <2> don't know for sure <0> there has to be a way to compute small times <2> yeah <2> I use boost's stuff myself <3> how dangerous is const_cast? <2> depends on why you're using it
<2> for dealing w/ legacy (poorly written signatures) code? not at all, you gotta do it <3> I was thinking about that, like if you use it to un-const the this pointer <2> geezus, why the hell would you do that? <3> I wouldn't <3> I'm just wondering really <2> every cast is a lie to the compiler <2> what happens after you lie <shrug> your call <3> gotcha. <4> how would I concatenate two c strings? <5> strcat <4> i mean, two character arrays <4> yeah? <5> A character array is a c-string. Well, if it's null terminated. <5> But you should use C++ style strings. Because they're better. <4> strcat(a,b) ? <0> i need to measure a really small time <0> how long a function runs <0> whats the best function <5> Dunk-: I think so. I haven't used that in years, thanks to std::string. You should do so too. <4> the system() call requires an old style string, and i am p***ed an old style string from a function <5> In any case, MSDN holds teh definite answer. I'm pretty sure it's strcat(a,b), but I can'T rememebr which one is concatened to teh other. <6> Dunk-: std::string x = "Test"; system( x.c_str() ); <6> There's no reason to use old c strings if you are not playing with legacy code <4> i'd be converting it to a std::string just to concat it, then changing it back <4> that's wasteful <6> Dunk-: You should use std::string whenever possible <6> Anyway ;) <6> use strcat then <7> Dunk-, why are you using system()? <3> Dunk-, <4> i'd be converting it to a std::string just to concat it, then changing it back <3> so? <3> You should be aware of the other advantages. <8> hey what's that c++ tutorial website that we hate the least? <5> ISn't it the one on About.com? <8> is it? <5> Eh, I think. <2> "That's what we're here for" 1986 Victor A. Wagner Jr. <2> Solamente says this tutorial isn't too horrible: http://cplus.about.com/od/beginnerctutorial/l/blcpptutorials.htm <2> sorry <8> heh <8> thanks <7> it's such a pain in the *** to handle them robustly <2> or just to handle them <8> or to think about handling them, heh <7> sometimes it's necessary <7> but when it's not..;P <2> brb, gotta reboot <9> I'd love to know when it is actually necesary <9> man <9> just revisited realultimatepower for the first time ina few years <9> the laughs are just as hard <2> hmmm, oddness, but Ithink things are back to normal (whatever that is) now <8> what's back to normal? <8> or, what wasn't normal? <2> I installed upgrade to Eudora, it wanted a reboot, ok, ... so it's coming back up and I get a "you need to reboot to finish installing Acrobat upgrade" <8> heh <2> I did, and I guess everything's settled, 'cept Eudora is re-indexing all the mails for "fast search" <10> <2> I wish I had an ftp program that did downloads like xcopy /D
<7> what does /D do? <1> [03:33] <peterg> Normally I do not JBlitzen but I bought a really good cpu and it was easy as pie to overclock this CPU from a 2100 to a 2500 in about 30 minutes <1> [03:33] <peterg> this was 3 years ago <1> [03:33] <GregE> I overclocked a amd k6III 450mhz to 650mhz <1> [03:33] <1> What did that enable you to do <1> [03:33] <GregE> brag <1> [03:34] <GregE> I dunno <11> and a less life-span on the cpu <12> . <1> :) <13> what you guys reckon a Data Type for Volst and Ohms? <13> both double? <13> is it a good idea? <13> Volts* <14> it depends on the operations you want to do on those. <14> double sounds like a good fit for most applications I can think of. <15> hi <15> how do i convert an int to a array of characters in cpp ? <15> in C, it's sprintf <15> but in C++ ? <16> Use std::stringstream and std::string <15> hmm <15> ok, thanks <17> std::stringstream ss; ss << 33; string s; ss >> s; <15> ok, thanks <15> 22 C:\Dev-Cpp\md6.cpp argument of type `size_t (std::basic_string<char, std::char_traits<char>, std::allocator<char> >::)() const' does not match `size_t' <15> now i get that when i wanna do str.length <17> and the code is? <18> hey guys. Is somefunction(i++) the same as { somefunction(i+1); i++; } ? <19> sasder, no <17> somefunction(i++) == somefunction(i); i=i+1; <18> aha <18> okay thanks <18> and sorry for the noob question :P <17> somefunction(++i) == somefunction (i+1); i=i+1; <17> that's how I know it, I may be wrong tho... <17> :) <17> you'll have to test it <15> if (len == 0) len = str.length; <15> len is a size_t <15> str is a string <17> str.length(); <15> oh <15> thanks <15> didn't know this is a function <18> sk8ing: thanx <17> np <18> oh... and 1 more question... is there any difference between these two declarations? char* s; or char *s; <17> no <18> ok :) <16> I prefer char* though - keeps the type clearly seperated <17> it doesn't <17> char* c, c1; is the same with: char *c; char c1; <15> it's just same <16> Yes, but when reading the code, it keeps the type clearly seperated <16> in theory, char * foo; is valid <20> char* c, c1; <- i prefer this way... <16> char* foo; maintains the "type[space]variable" readability <17> and c1 will be? <17> I use it like char *c; <14> Cantide: I would fire you for writing that line. <17> char *c, c1; it's way clearer than what you've wrote <17> a begginer might think that c1 is a pointer too <17> so the type is not char* <14> Well, I'd fire you for that line as well :P <17> it's char <20> >_ <20> >_< <15> if (sk8ing.infire) sk8ing.infire=0; <17> :) <20> heh <17> sk8ing.infire^=sk8ing.infire; <17> faster :P <14> Seriously, defining objects of different types within one line of code is a bad idea. It's also a very bad idea to leave pointers uninitialized.
Return to
#c++ or Go to some related
logs:
#MissKitten #windows ubuntu primary_hostname ip_tables.ko: -1 Unknown symbol in module array javascript push support IE6 irhas what is the most mountainous country in europe #linux #MissKitten t
|
|