@# Quotes DB     useful, funny, interesting





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



Comments:

<0> you don't need to
<1> hmmm
<0> the default constructor is fine, yes?
<0> er wait a second
<0> a const map?
<0> yeah, you can't initialize that
<1> yes, static and const
<0> hmmmm let me think...
<1> so I only init it once
<1> and it cannot be changed afterwards
<0> hmmm
<0> maybe do something like this:
<0> create a normal reference that's ... more hidden



<0> then create a const reference to it, and everything else uses that? I dunno
<1> hmmm...
<1> not bad. so there is no way to have a static and const map and be able to initilize it
<0> there probably is, we're just not being clever enough
<1> lol
<1> ok
<0> for example, you could do something like this
<0> write a static method that returns the map you want
<0> then initialize your const map with the return value of that method
<0> std::map<whatever> F() { std::map<whatever> m; m.add(whatever); return m; }
<0> static const std::map<whatever> m(F());
<0> F would have to be static too... try that? :P
<1> i will
<1> doesn't work! :(
<1> error C2061: syntax error : identifier 'initFiltersMap'
<1> this is the equivalent of f() in your example
<1> F()
<1> i had to move static const std::map<whatever> m(F()); to the cpp and remove the static
<2> howdy The_Vulture
<3> g'day scalar
<2> weird. my n is broken
<2> it doesn't appear in my console windows
<3> very odd
<4> hi
<5> I have a simple question
<5> I have a loop which does 30 iterations of an sql request, feeding one of the extracted items back into the where clause of the next request in the loop
<5> say, SELECT i, y FROM table WHERE table.i = a and then the next iteration put the resulting i into a (simplification)
<5> how can I express this in pseudocode?
<6> can u help me ? want the implemenation of binary search tree opertaion in c++
<7> use OOD
<7> create a separate Object for every branch
<8> where can i find it
<9> Hello
<7> hi
<9> i want to write a code , so that a function returns a random line from a given data .. or u can say many lines .. how ? can somebody help me about this
<7> you want to write a code...
<7> ok, that's not my department
<2> ceeplusplus: do you know how many lines there are?
<2> total number of lines?
<9> about 500
<2> do you know exactly?
<9> yeah exactly
<2> ok. find a random number x between 0 and (n-1) -- both inclusive, where n is the number of lines. read x lines and discard them. then read a line and use it
<9> hmmm
<9> ok' i try , thanks
<8> can i help u whee can i find the implemenation of BINARY SEARCH TREE WITH C++
<10> Good morning James.
<2> Happinessss: http://www.google.com/search?q=binary+search+tree+c%2B%2B
<2> now shut up
<7> lol



<11> Good afternoon, James.
<7> oh ****
<12> Hi Vlad, James.
<13> Anyone know a good code beautifier? that supports preprocesssors //#if
<12> Hail, teq.
<14> Ave Reth; how goes?
<12> :)
<14> g'nite
<15> error C2297: '%' : illegal, right operand has type 'double'
<15> can any1 tell me how to fix this
<15> i'm trying to use the rand() function
<16> cast it to an int? modulus is an interger-only operation
<16> that's just a guess. i haven't seen your code. frankly, i'd be suprised if % didn't automatically cast its inputs
<15> i don't have any variables other than ints
<15> however, i do get this warning at compile time:
<15> warning C4244: 'initializing' : conversion from 'double' to 'const int', possible loss of data
<16> apparently you have at least a temporary that's a double
<16> do an explicit cast
<15> how do i do that?
<16> read up on c++ casting
<15> ok
<15> can i use a # directive to disallow any number other than int in my .cpp file?
<12> No, but it should be obvious if you have a floating point literal.
<12> Do you have any number that contains a period or ends in an F or f?
<15> i have fixed this. you must declare separate variables, eg: int upper = 100 * 1.2; int lower = 10 * 0.8; random = lower + rand() % (upper - lower + 1); NOT random = 10 * 0.8 + rand() (100 * 1.2 - 10 * 0.8 + 1); <- != working
<15> no
<12> "No" what?
<15> Do you have any number that contains a period or ends in an F or f? <- i do not
<12> 0.8 contains a period. It's a double.
<12> When you mix doubles with other types in an expression, integers will be subject to floating point promotion.
<15> hmm you're right
<12> ...and because that makes everything double, you can't use operators which aren't defined for floating point types, unless you cast.
<17> :o
<15> if i have a variable , 10, and i want the max variation to be 12, min variation 1, how do i do this?
<12> 10 is not a variable. 10 is an integer constant.
<18> 'lo Rethguals
<18> et al
<12> Hi :)
<18> (+:
<18> up late?
<12> It's 19:12 here in London.
<18> still sunlight there? i remember reading some places in England receive sunlight until as late as 2100 in summer
<12> Yup, sunset is at 19:49 at this time of year.
<18> that's late. what about up north? is it earlier up near Aberdeen/Edin?
<12> No, a fraction later, but not much. It's not like the north of the scandinavian countries, where the sun doesn't really set on the longest day.
<12> Ah, 21:21 is the latest the sun sets here in Summer.
<12> 16hrs 39m of sunlight.
<18> ouch
<12> Well, daylight. It's not dark at that time.
<18> that's enough to spoil the umm what is it called? circadian cycle?
<18> s/spoil/disrupt
<12> Hehe, I find it quite comfortable :)
<18> you're a programmer d(+:
<18> that was a joke ...
<12> No, I am a programmer, honest!
<18> er no. i mean it was supposed to be a play on the myth/general ***umption that programmers keep weird hours. didn't mean to offend your sensibilities
<18> bbl


Name:

Comments:

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






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

how to retrieve computer id
#allnitecafe
#chat-world
#php
#worldchat
#allnitecafe
Jenn Juck
#chat-world
realy drunked
ok madam



Home  |  disclaimer  |  contact  |  submit quotes