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



Comments:

<0> oh, ok
<1> peterhu how difficult is it to mix a "managed" C++ w/ normal C++ ?
<1> I found my read a url code, but it's using System and a few other things
<2> there are some issues about around interop, but calling managed code from native code is trivial (you just simply call it)
<2> if it gives you back a System.String, you'll need to do a little work to get that into a wstring
<1> yeah, I saw some stuff on converting String to wchar*
<2> ref struct Foo { static int Bar(); } int main() { return Foo::Bar(); }
<2> for instance
<1> ok, cool
<2> the C++ compiler will handle the native to managed and managed to native transitions
<1> maybe jill can use this, it's only about 20 lines



<1> http://noidea128.org/sourcefiles/16045.html
<1> peterhu can you take a quick look at that? is it ok to reaturn the String^ like that?
<2> looks fine to me
<1> ok, that's the 1st non-native C++ thing I've written, it seems to work too
<2> note that, correctly, the reader and writer are using stackbased semantics, so if they implement IDisposable, it will automatically get called (a form of deterministic destruction)
<1> ah... .well to say that I don't grok String^ would be an understatement
<2> (IDisposable.Dispose will get called, that is)
<2> ^ is a handle type; think of it as a garbage collected pointer
<2> you can call delete on a handle, it will call IDisposable.Dispose
<1> but I never did a "new" for them
<2> the methods did
<2> that you're calling
<1> ah
<2> watching bs:g finale, awesome CG work on that nuclear explosion
<1> so reader.ReadToEnd(); does the allocate
<2> yep
<2> now THAT's a good season finale
<1> everybody die?
<2> well, a good number did
<2> just an excellent series
<1> I guess I shoulda "taped" it this season
<0> rdragon: boost::function and boost::bind don't seem to work for my purpse. The problen is the following example: struct A{ void f(int){} }; boost::function<void(int)> func = boost::bind( &A::f, some_a, _1 ); func( 21 ); <<--- Is that cl*** A is variable within the same container.
<0> hmmmmm...
<0> i think I used it wrong. so let's say that Property object takes in ctor the 'key' and the 'method pointer'. the ctor would be Property(string, boost::function<void(string)> ), and then later when I construct my Property object i use the myProp('port', boost::bind( &A::f, some_a, _1 ))?
<3> yes
<0> great, ok, makes sens
<0> i just hope that the ::function and ::bind are not extremly slow
<3> they shouldn't be
<0> ok, thanks again.
<3> np
<0> one simple question. why do people use 'struct{}' instead of using the 'cl***' keyword in samples and such?
<4> likoo, because access is public
<1> do you know what the difference is?
<0> no :-/
<0> is that the only difference?
<1> struct has default public access, cl***-private
<5> sometimes you need functions on your data, not data by themselves
<1> _giorgio_ huh?
<0> ?
<6> _giorgio_ : structs in c++ are almost exactly the same as cl***es
<5> as far as i am concerned i make little use of struct, for simple data types. i supose they do it for sake of simplicity
<7> huh?
<5> why not?



<5> =)
<8> structs in C++ are identical to cl***es in C++ with the sole exception that structs default to public access while cl***es default to private access.
<8> Thus structs are handy for purely organizational objects
<8> struct node { node *next; data d; };
<5> ok, but cl***es may have functions as members.
<5> as well as variables
<9> oi
<5> attributes can be inherit from other cl***es
<10> toi
<11> so can structs, _giorgio_
<11> like JBlitzen said, they're the same thing except for the default access
<9> if i have cl*** A {} cl*** B : public {} int main() { A* foo = new B()}
<9> that compile righ ?
<4> toast, no
<11> not exactly
<11> you have a bunch of syntax errors
<11> and there's no need for the ()
<9> i mean, without the syntax...
<9> A* foo = new B();
<11> A* a = new B; yes
<9> whoo ooh
<11> if A is a base cl*** of B
<11> get a book
<11> you've been in here far too long to be asking questions like that
<5> i still dont get it. you mean that a function can be a member of a struct? can a struct inherit another struct?
<4> _giorgio_, yeah
<4> _giorgio_, everything you can do with a cl***, you can do it with a struct
<5> never seen or heard about that before
<9> i had an exam, was just checking
<4> _giorgio_, so you son't have seen mutch yet
<11> _giorgio_ then you must be stuck in C
<4> s/son/don
<9> but i messed up heap insertion :'(
<5> indeed, i suppose i haven't seen enough yet. what i say is that with a cl*** you can do more, not the other way, i m not stuck with c
<4> _giorgio_, no, you can't do more
<4> you just do differently
<5> i see
<5> can i use volatile or register keyword for a c++ variable?
<5> just like in c
<4> yes
<1> _giorgio_ yes, but register is essentially worthless
<5> it s theoritically faster, let s say for 150000 iterations of i
<1> _giorgio_ nope
<12> Maybe when vawjr was young
<1> yeah, maybe back then
<12> Not like anybody remember those dark days
<1> all that volcano dust in the air
<5> =)
<11> yeahh got tax refund ;p
<5> so what s the news? =)
<8> Heh vic
<8> Woohoo rd


Name:

Comments:

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






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

#windows
#linux
sexygirl25 webcam
mysql count weekends
#AllNiteCafe
#london
sexy roleplay
indian squaw jpg
vangaurd break NDA
struct char array



Home  |  disclaimer  |  contact  |  submit quotes