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



Comments:

<0> The second line defines a pointer to float named ptr1 and initializes it to point to the first array element.
<0> The third line defines a pointer to float named ptr2 and initializes it to the value of ptr1 (a pointer to the first array element). Then it increments ptr1 so that it points to the second element.
<1> go on
<0> The fourth line deferences ptr2 (a pointer to the first array element) and divides the result by the second array element.
<0> The result of 500.0/125.0 is gets ***igned to num
<0> That would be 20.0
<1> how come its 125 ?
<0> array indexes start at zero
<1> oh
<0> The sixth line increments ptr1 so that it points to the third array elements. It then divdes num by what ptr1 points to.
<2> object[] obj = new object[5];
<1> but you said 4 arrays
<2> oops sorry
<1> i see only 3
<0> So then you'll have 250.0
<1> 0,1,2, no ?



<0> Sorry, that are three, of course.
<1> ah ok :)
<1> so i got it
<1> rma[1] is actually the second array
<1> thats why its 500 / 125
<2> exactly
<1> which is 4
<0> ah, right
<1> and
<1> ++ptr1 would be the third array
<0> (array _element_)
<1> so its 4 / third array which is 4 / 0.5 which is 8
<1> :)
<1> correct ?
<0> yes
<1> great :)
<1> thank you so much.
<1> next stop, control structures.
<2> why not SevenVolt
<3> Hello
<3> what is the cheapest online DVD shop?
<4> Rom2, your question is offtopic on this channel.
<5> can some one help a newbie
<5> im getting a expected primary-expression before '[' token
<5> http://rafb.net/paste/results/EvnjgY69.html
<5> but i just dont see why
<0> Product probably isn't defined or doesn't name a variable.
<5> _m_ do you want to look at the whole code for me
<5> I checked it, dont a problem
<5> see*
<5> Can you use a function from one cl*** inside another cl***
<5> like i have a vector in a cl***
<5> no i need to add somthing to this vector to belongs to another cl***
<5> so i go order[i].setbla(x);
<5> order is a vector in the other cl***
<0> you need a reference or a pointer to an object of the other cl***.
<6> how is C++ .NET is compared with other implementations ?
<0> Then you do other_refence.order[i].setbla(x) or other_pointer->order[i].setbla(x)
<5> I dont get it, I thought as long as you #include the other cl*** you can use the object and its functions
<5> Whats the best way with a array of integers to test if each one is less then x
<7> for (int i = 0; i < arraysize; i++) if (myarray[i] < x) { ... }
<5> thanks moon, i was thinking maybe there is a std function for it
<7> np
<5> can i do this, bool re, re = 1; if !(re);
<8> Hi there,how can I copy as text a protected PDF?
<9> gone at church lots of errands to do in town today, brb, but likely several hours
<9> lots of errands to do in town today, brb, but likely several hours
<10> This channel is pretty dead around this time of the day.
<11> Does anyone know if lua has a channel on irc somewhere?
<12> what's lua ?
<13> carve: yes, on Freenode
<11> thx
<0> Cowmoo: a programming language.
<0> (easy to embed into C or C++ programs)
<13> muh?
<13> I'm not the one who asked :)
<0> err, sorry, that was for exception
<13> heh
<11> Do you know if there exists one with integrated wowlua help? =)
<0> What's wowlua?
<11> world of warcrafts addon script language :)



<11> it's lua with wow api
<0> I see. And I have no idea.
<14> question, in linux shell script there is CASE i was wondering what the c++ equivalent was
<15> switch(variable){case value:}
<15> http://www.hello-world.com/cpp/switch/switch.php
<0> There's a linux shell now?
<16> hmm. do I want to order a Macbook
<0> I thought people would be using some variant of Bourne Shell or C Shell.
<14> sorry bash
<17> heh
<16> bleh. csh, I could never get my head into it
<17> Asriel it's not meant to be treated like that
<0> tcsh has better filecompletion.
<14> thanks sepheus
<0> (and it had completion long before bash had it)
<13> better how
<0> E.g. for a long time, bash didn't append / to directories. (I think bash can do that, too, now)
<0> tcsh completion is configurable in countless ways.
<16> by default, it will add / in autocompletion now
<16> no idea about past behaviour. either is was before my time/I forgot about it
<0> E.g. I have command completion for cvs and svn that knows the commands of those programs.
<16> aye, you can do that with bash as well. I forget how though
<15> geneticss, no problem ^^
<0> it can expand targets from makefiles.
<0> (extremely useful, IMO)
<16> hmm. still 300 words over the limit, with 300 odd still to write
<16> damnation
<18> !list
<18> !rules
<10> I have a problem:
<10> I need a template to perform some binary operation (&, |, ^, ==, +, etc)
<10> But, not all operators are defined for the type(s) p***ed to the template function.
<10> The problem is that it tried to instantiate every operator, not just the one that corresponds to the template parameter (int).
<10> tries
<10> http://www.rafb.net/paste/results/PjCRXE73.html
<0> Run: create a structure templated on bop. You'll then need to partially specialize that structure for AND and OR. The structures operator() should be templated on T and perform the desired operation. In do_operator, create an instance of structure<OP> and call its operator().
<0> (partial function template specialization through the backdoor)
<19> hello all
<19> any one can help with VC8
<19> i used SetWindowLongPtr, according to microsoft documentation it take LONG_PTR for window Procedure
<19> but I found its declared as LONG in their header file
<10> _m_: ok, that works: http://www.rafb.net/paste/results/Yg5elw55.html
<19> <10> is that link for me
<10> _m_: The next problem is how to get the return type of operator() right :/
<10> I can't know the return type, because 'A' is an external cl***... with it's own operator&. The ONLY way I can get to the return type is by calling operator&(A, A) and looking at what it returns.
<0> The really ugly thing is that you can't know in advance where the operator & comes from.
<0> It can be a member function or a free function.
<0> So typeof looks like a good choice if your compiler supports it (you use gcc, anyway).
<10> _m_: yes... hmm. but the return type will the same, and I'm fairly sure that the free function will exist.
<10> Do I need a header for typeof ?
<0> No, it's a built into the language like sizeof.
<10> typeof operator&(T const&, T const&) operator_struct<AND>::operator()(T const& a1, T const& a2)
<10> gives
<10> troep.cc:19: error: expected primary-expression before const
<20> hii
<20> all
<0> typeof needs an expression, I think.
<0> So it probably should be like: typeof (T() & T()) operator_struct<AND>::operator()(T const& a1, T const& a2)
<0> (if T doesn't have a default ctor then typeof (*(T*)0 & *(T*)0) should work)
<0> That would also fix the free function vs member function issue.
<0> I can't they whether this is correct, because gcc ICEs.
<10> upgrade it
<10> I have something working: http://www.rafb.net/paste/results/28ytkU93.html
<10> trying to get back to using template<bop OP> struct ...
<0> ah, a typedef might work around the compiler problem.
<10> right... it cores here too :/
<10> troep.cc:13: internal compiler error: in write_type, at cp/mangle.c:1645
<10> Is that what you get too?
<0> looks like it ICEs while trying to print an error message.
<0> yeah
<0> We saw that error a lot in gcc 2.95


Name:

Comments:

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






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

HELO ionut
#networking
#mirc
1 FOLLOWED BY 42 ZEROES?
toms willy
#AllNiteCafe
#AllNiteCafe
420chan/pedo
#linuxhelp
#london



Home  |  disclaimer  |  contact  |  submit quotes