@# 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 13 14 15 16 17 18 19



Comments:

<0> about invalidating an interator, if I'll make it v.end(); after I'll do a v.push_back(); will the iterator point to the last added object?
<1> no
<1> it might, but not always
<0> and how do I make sure it won't point to any value inside my container?
<2> huh?
<2> what are you trying to do?
<1> Don't use invalidated iterators, simple.
<0> well... when I had that index I could say myindex=-1
<0> then check if it's -1 or if it points somewere
<2> -1 ?
<2> certainly you wouldn't be using a signed type as an index
<3> I'd say 0 looks like invalid iterator
<1> sk8ing: you don't NEED runtime checking there, you KNOW that that iterator is invalidated, so just don't use it at all.
<4> [21:06.43] <0> electricity went down
<4> [21:07.17] <0> anyhow, I was saying that it was preatty ok to use it as the list will never grow longer the 250 elements or so
<5> hello



<6> can someone tell me what's the difference between (*this)->somefunc() and this->somefunc()
<1> one compiles, the other not.
<7> I trust you mean (*this).somefunc()
<5> anybody here ever programmed drivers for linux or windows?
<4> is it still wrong?
<5> i want to make a driver for linux for my 8-button mouse, and one for windows because the current one doesn't offer me enough functionality
<0> :((((((((((((((((((
<0> I HATE MY ELECTRICITY PROVIDER, MY INTERNET PROVIDER, MY WATER PROVIDER!!!
<5> if any of you can give me some tips/links/tutorials/etc. please msg. me
<2> sk8ing then cancel them
<6> vawjrwrk no i saw it written like that
<0> I can't... water and electricity: one provider. ISP: friend of mine
<6> it was in a cl*** like this cl*** somecl*** : public CComPtr<ISomeinterface>
<3> sk8ing: fire them
<0> I'll have to live with them
<7> Vaan I have NO idea what you're playing with
<0> ok, I'm going back to fixing my code
<0> ok, I'm going back to fix my code
<6> i'm playing with COM/ATL
<7> ok, have fun
<0> lol
<6> ohhh come on man i need to know if this call is for the overriden method in the super cl***
<2> then why didn't you ask that?
<6> rdragon speaking to me ?
<2> yes
<2> you didn't even indicate that inheritance was involved
<6> well it was a piece of code
<2> that says very little
<6> it was in a cl*** like this cl*** somecl*** : public CComPtr<ISomeinterface>
<2> so? what's 'somefunc' ?
<2> it's not going to call a base cl*** version of it by using this->somefunc();
<7> Vaan if they're both legal, then they've overloaded -> and *
<2> ***uming it's virtual
<7> in a non-normal fashion
<6> it 's from an interface so yes it is virtual
<7> I'm not gonna go look at either somecl*** NOR CComPtr to figure it out
<2> Vaan how am I supposed to know that 'somefunc' was declared in CComPtr ?
<1> Does the unary * have preceedence over operator[] ?
<2> or ISomeinterface, whatever
<8> Nope
<6> it is because somefunc() is part of the ISomeinterface
<8> *a[x] is like *(a[x])
<1> Ashe`: http://spirit.sourceforge.net/distrib/spirit_1_8_3/libs/spirit/doc/style_guide.html
<2> and how would I magically know that?
<1> says: alpha >> *(alnum | '_') [id_action]
<6> CComPtr is just a smart pointer
<8> There's the |
<2> Vaan why don't you paste the -real- code to the paste site
<1> Where id_action definitely should apply to 'alpha >> *(alnum | '_')'
<6> ok hold on
<9> i've never seen CComPtr derived from, nor would i hazard a guess why you would do it
<2> yeah, that does seem especially odd
<2> Vaan maybe you might try explaining just what you're trying to do
<6> what's the paste site
<6> ?
<6> a link pls ?
<9> topic
<8> I guess it's alnum | '_', then [], then *, then >>
<6> http://www.noidea128.org/sourcefiles/15844.html
<6> here it is
<10> hi all



<6> as u can see in the open method is that call
<6> or in the other methods
<9> the whole point of a CComQIPtr is that it tracks the interface reference, it should never have the side effect of creating a COM object on construction
<11> vawAFKhome: awake?
<11> vawjrwrk: awake?
<8> He was, 5 minutes ago
<11> hrm
<11> which one? ;)
<8> The working one
<7> CComPtr does NOT have a virtual destructor
<12> guys why do this code don't append to the file beginning: http://cpp.sourceforge.net/?show=11684 ?
<8> You can't "append to the beginning of a file"
<2> heh
<8> You can read the file, write at the beginning, then write that you've read
<8> s/that/what
<6> so any thoughts ?
<9> yes: rethink the approach
<6> it's not my code
<2> then throw it away
<6> i took it from MSDN Magazine
<6> and it's working
<12> Ashe`, u mean creating a temp file ?
<6> i'm just curious about that call
<8> If you think it'll take too much memory, yeah
<8> Or just use some buffer
<8> If you know you have to prepend 50 KB
<8> Just read 100 KB, write, read, write, etc
<12> strstream would be easy for this task ..
<12> thanks
<8> Ehm... what?
<12> Ashe`, istringstream
<7> Darwish strstream or stringstream?
<9> the whole disgusting thing could be replaced with a CComPtr<IDiscMaster> spDiscMaster; if (SUCCEEDED(spDiscMaster.CoCreateInstance(CLSID_MSDiscMasterObj, NULL, CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER))) { spDiscMaster->Whatevah(); }
<9> no reason to obfuscate the HRESULT returns into BOOL, either
<9> you lose any meaningful information
<12> Vaan, I meant istringstream .. I dunno if the word strstream is defined
<12> Vaan, strstream was a typo
<7> it is, an dit's deprecated
<9> and if you're going to obfuscate, at least use bool over BOOL, unless you require to export those signatures
<7> though it has some useful features
<3> strstream was defined before string was
<9> the author of said MSDN article should be shot in the head
<8> Darwish: I'm not sure why you'd use an istringstream, you already have a file stream..
<6> well thx guys
<7> best of luck vawAFKhome
<7> err, Vaa
<9> heh
<7> geez, he's gone
<9> if it is indeed from MSDN Magazine, that's the most disgusting example i've seen to date
<7> ooh, ooh, can I see?
<9> a smart pointer that creates a COM object on construction, that takes the cake
<9> http://www.noidea128.org/sourcefiles/15844.html
<9> he's claiming it's from MSDN magazine, verbatim
<12> Ashe`, <8> Or just use some buffer <-- you mean a temp file here, or a stringstream ?
<7> is it supposed to be a "proxy" object
<9> except it derives from CComQIPtr rather than encapsulates one
<9> OOP Design: 101
<8> I mean something like a vector<char> I suppose
<7> and the code iuses an ***ERT in a constructor? did they ever think of an exception??
<9> heh
<9> well, considering this code uses BOOL, probably not
<8> I don't use ***ert's and exceptions for the same thing
<12> aha, ok
<9> definitely disgusting
<9> i think i've lost my appetite
<7> how come we don't get to write this->-> instead of having to write (*this)->
<9> no wait, it's back
<8> Huh?
<8> Ah, for operator ->?
<9> (*this) = derived from CComQIPtr, overloaded ->
<12> operator () for an operaotr ()
<8> You can probably do this->operator->( )
<12> !!
<8> I guess


Name:

Comments:

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






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

#apache
gentoo yelp mozilla-firefox-bin
#AllNiteCafe
Artfull Dodger bg
#networking
#linux
#windows
nick-uri faine
#london
wdc wd2000jb 00KFA0



Home  |  disclaimer  |  contact  |  submit quotes