@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5



Comments:

<0> Well..
<1> no, void returns NO value, not an "empty" one
<0> In VB you have subs and functions
<0> Subs don't return any values
<1> Pascal, ditto
<0> So then explain your statement above
<1> IRR who do you want to explain ?
<2> vawjrwrk: hmm, also math functions doesnt need to return a value always. There is always non-termination choice, where the function never terminates and thus does not return a value.
<1> _Codex you work in a different math than I
<1> mathematics functions don't "execute"
<1> they _do_ however have both a domain and range
<2> in math there is proofs and proofs can be simplified. And execution is similar to proof simplification.
<1> irrelevant to the definition of function
<2> right
<3> need more help http://www.noidea128.org/sourcefiles/16283~
<1> #include <utility>



<1> std::swap(V1, V2);
<3> don't think I can do it that way, can I make another function to do this?
<3> something like V1 = main (V2);?
<1> oops, maybe it's in <algorithm>
<1> huh??????????
<1> main(V2) ?? what the heck is that??
<3> in the new function it would get the value for V1 from the inputted value in main?
<1> 1) you cannot call main from your program
<1> 2) your main wasn't accepting ary arguments
<3> ok, so then how do I do it then
<1> how long have you been studying C++ ?
<3> 4 weeks
<3> I'm a newb, we are learning how to call functions, that's what the purpose of the question is I believe
<1> so you're supposed to write a function that swaps the values?
<3> yes
<1> well, what have you written (for your function) thusfar?
<3> I think this is completely wrong ... http://www.noidea128.org/sourcefiles/16285
<2> hosebag: parameter p***ing doesn't work -- you cannot see the changes done to the variables outside the swap function.
<2> hosebag: and the swapping mechanism is broken.
<2> hosebag: otherwise you're very close.
<3> this book is a piece of ****!!
<3> so, how do p*** a variable?
<2> hosebag: you need to learn either pointers or references to do correct swap method.
<2> hosebag: or maybe a struct, if you want to return them.
<2> hosebag: void swap(int &v1, int &v2); <-- here's example with references.
<2> hosebag: that single & there allows you to p*** modifiable variable to the function.
<2> (instead of p***ing just values)
<4> dear lord
<4> JBlitzen is "teh sux"
<5> Anyone here familiar with indexers in C#, I'd like to do something similar in C++. like template <typename T> T operator[](int i);
<6> well, off you go then :)
<6> nothing stopping you
<7> generic library
<6> but you might want to consider std::vector/map etc, depending on what you're trying to create
<2> mopos: in C++, you have iterators for the same thing.
<5> Asriel, haha, i jsut typed it in and it worked wtf :p
<1> mopos you want to write a general global intexer??
<5> _Codex, elaborate please
<1> normally one wites one for a container
<2> mopos: see vector<T>::begin() and end()...
<6> well, indexers and iterators are different concept
<6> indexers are basically C#'s operator[], except exposed in a language portable way
<5> _Codex, im using it with mysql_use_result so im only getting 1 row at the time
<5> so no need for vector
<1> so what you really have is a container called a result set
<1> and a "cursor" in the SQL sense and you want to use it
<6> if you're using operator[] to index into an underlying rowset, be careful
<6> for that way can lie performance pain (a lot of rowsets are forward only)
<6> and if you're just enumerating element 1 to n, a suitable iterator is a more sensible exposure
<8> join(map<T,K>&a, map<K,L> &b);
<9> ugh
<9> it's crazy hot in the office today
<9> I should have worn shorts.
<4> pfft
<4> it's beautiful out
<4> like 70
<4> mmm
<7> it's gross here :(
<4> i suggest you don't live in a hell forsaken place, noidea



<7> cold and windy as hell
<9> it's nice outside
<9> it's hot in the office.
<9> http://www.weather.com/outlook/travel/vacationplanner/local/94085?lswe=94085&lwsa=Weather36HourVacationPlannerCommand&from=whatwhere
<1> http://www.weather.com/weather/local/83001?lswe=83001&lwsa=WeatherLocalUndeclared&from=whatwhere
<9> ahhh, how cute, we've got the same weather.
<1> yeah, but the mountains are higher here
<9> yeah, that's probably true
<9> but, the new climbing gym just opened here today.
<9> oh, the walls and holds are really rough still.
<9> super friction.
<9> at the old gyms they're wearing down from use.
<10> hello
<1> howdies
<10> i have question about singleton
<10> if the constr is protected how the first instence of the cl*** is created ?
<11> fozo : there's usually a public static method, named instance that creates and returns the first - and the only - instance
<4> fozo, usually either through a factory pattern that has access to the constructor (friend), or a public static method on the singleton type that returns the instance
<1> mukles knock it off
<12> sorry :)
<10> http://rafb.net/paste/results/tq5Ig165.html
<10> this is the code
<10> and again my question
<1> fozo although the standard only gives names with TWO __ in them and _Followed by an UPPERCASE letter, you might wantto consider moving your _ to the end of the word (instance_)
<10> and about the question
<4> the code is not thread safe, but that's effectively the pattern usually deployed
<10> no i can"t understand how the first instence of the cl*** will be made if it constructor is protected
<4> the Instance() member function has access to it, same type
<11> fozo : protected or private ctor means nobody from outside the cl*** can create an instance
<11> but nobody creates an instance from outside, the creates one itself
<10> but when i want to creat one i do new singelton
<10> and i don"t call to theInstance function
<10> i think i got you i shouldn"t do new each time when i need the cl*** i should just call the Instance function
<10> and i can do it from each place in program because it static
<10> did i got it ?
<11> fozo : you never do new singleton. if you have cl*** MyCl***, and it's singleton, you will always access the member as MyCl***::instance()
<11> instance() is a static function so you can call it everywhere without creating an instance first, and it does create an instance the first time it's called - but it's done internally, so it's part of MyCl*** - so the constructor being private isn't a problem
<10> ok i got it
<10> thanks
<4> Vista Beta 2 tomorrow it sounds like
<4> that should make Solamente happy
<13> whats the difference beetwen c and c++ ?
<6> Too numerous to go through here. Try google
<6> Bleh, Vista. Interest == Virtually 0
<6> Now, OS 10.5, that I am interested in
<4> for a quick analogy: peterhu = c++, JBlitzen = c
<6> We'll get to see what Windows 2012 will contain!
<4> indeed, if i could just afford a mac that didn't either have integrated graphics or so much thermal paste applied it makes it look like JBlitzen constructed the unit
<6> the thermal paste thing is just weird. Dunno why they didn't use pads
<6> on the other side, a lot of it is just bitching
<6> It doesn't actually overheat the unit, and all this "I BURNEDED MYSELF ON MY IBOOK" crap is just...crap
<6> I've used powerbooks, ibooks, imacs etc. I've never had them even be uncomfortably hot
<6> hot sure, but I've used hotter dells
<6> intergrated graphics doesn't bother me, as I won't be playing any games. Can see why some people are concerned though
<4> well, when a tomshardware review shows temps at 85, that's a bit much
<4> the apple manual images are hilarious, if those are actually in the manual
<14> Why would you use Vista when you have linux, homo
<6> only if that temperature is A) Getting through to the case externals or B) Damaging the hardware
<6> best I can tell, neither is happening
<4> they literally show a JBlitzen-after-a-gay-night-on-the-town-sized glob of goo on the processor
<14> It might damage khan's GeForce 2
<4> my coworker likened it to softserve icecream
<6> yeah, it's not great engineering. But when you get your kit constructed by $0.01 an hour chinese slave labour, you're not going to get Nasa engineers
<6> which is why I can't understand why they didn't just use thermal pads. Not as good as well applied paste, but a lot better than badly applied paste
<4> though, i'm not one to complain, i can't keep my X1000 in my lap easily when plugged into AC
<6> never had a problem with my ibook. Odds on to be upgrading to a Macbook in the next week or so though
<6> given I've found someone to take this for , leaving the net upgrade cost as
<4> eh
<6> (selling my ibook)
<4> integrated graphics = JBlitzen-sizd ****itude
<6> only if you play games
<6> if you don't play games, I don't see the problem
<6> it runs everything else just fine. Hell, it will still play games, just not at great framerates
<4> other than the fact it makes your man parts shrivel up and die


Name:

Comments:

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






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

chatzone peru
#javascript
gg`allin efnet
adeline adni
Soundclick lesaccrodryme
#AllNiteCafe
doomgazer
#linux
mythtv whitecap
#linuxhelp



Home  |  disclaimer  |  contact  |  submit quotes