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



Comments:

<0> It can do anything if you write it yourself.
<1> there does exist a default ***ignment operator
<2> ok
<0> Yeah - that will just call operator= for each element.
<2> thanks guys yuo cleared up a lot for me
<2> right for each member..
<1> the default constructors can't get generated if you have a reference as a member, too
<0> yeah, member
<1> since it needs to be initialized
<2> ah
<2> ok so in that case you don't get one generated
<2> then it complains your cl*** has no c'tor
<2> heh
<1> it'll say something like 'unable to generate...'
<2> well depends on compiler.. G++ 3.4 just says "moron yor cl*** has no constructor but it has a non-static reference.. IDIOT!"
<1> yes, depends on compiler of course



<2> ok so let's say you implement a default constructor.. and decide to not initialize things like ints.. *then* they will get random values, right?
<2> otherwise if yo don't do anything all your ints get zeroed, right?
<3> implementation defined
<2> well, i am guaranteed that the compilr at least didn't go and zero my ints, right?
<2> i mean the memory coul dhave been zeroed by the allocator maybe, etc.. but the compiler didn't do myint() for me, right?
<3> why should you be guaranteed your compiler doesn't initialize them to zero? if you initialize them to some value, then you are guaranteed that they will be that value
<2> whereas if i don't do anything it will do int()
<2> well because sometimes you don't want your compiler doing extra work for you
<2> for whatever reason
<3> if you don't initialize primitive types, you aren't guaranteed of their value (where as for other types, you're guaranteed that their state will be that after their constructors are run)
<2> ah, ok
<2> so in the default constructor for a cl*** no 'default consturctor' is called for primitive types then, right?
<3> right
<2> good
<2> i guess then that makes unions still possible
<2> if you are doing system-level code that needs it..
<3> so if not initialized they can have any value - a particular compiler might initialize them to 0, another compiler might initialize them to 1337, others might let them have whatever was in that memory previously, etc.
<2> good, that's what i want
<3> unions are still possible, yes
<1> Fudge do you need a book?: www.rudbek.com/books.html
<2> the requirement ofr unions is that none of the members have a constructor
<2> i have tcpl but i am too tired now to open it.. figured i'd ask in here, but thanks
<4> Hello, how do I make a window always receive messages? Think clock program..
<1> tick tock, tick tock
<3> Marila2: always receive messages? when would a window not receive messages?
<1> when it's not sent messages
<4> well if it's minimized it doesn't receive messages, I think
<1> what messages are you expecting to receive?
<3> Marila2: it receives messages when it needs to receive messages: if you want a message periodically (such as a timer) look into SetTimer() (if you're doing Windows API programming)
<4> ohhh cool, thanks
<3> brb
<5> hello
<5> when i get an error 'bad brackets ()' and i delete the lines and reenter them
<5> still same error
<5> what can i do please?
<6> perhaps you shouldn't be putting ()'s there?
<7> why do you think removing a line and then entering exactly the same will remove an error?
<6> it happens, but you don't do that *to* remove an error
<5> cos it might have been a bad error
<6> once at work there was an unindented } in the code, and placing it correctly stopped the app from crashing
<6> we were all like huh...
<8> great compiler you use.
<6> vc7 actually
<5> i just use gcc
<7> Smileycam, posting the code at the paste site would be great
<5> okay
<5> will give that a try
<5> done for anyone to have a look at.
<5> http://www.noidea128.org/sourcefiles/16351
<7> what line causes the error?
<5> lines 133 to 135
<7> you have a do..while loop but never mention the while part
<5> meaning, sorry i am new
<7> btw.. you should probably use either a switch or change those if's to else if's
<5> this is how we were shown in our lectures.
<6> *this* time it is C
<6> I can't recall how many times you guys have said that and it were neither
<9> haha
<9> yeah
<10> hi
<10> what's wrong with this code



<10> please see line 33
<10> http://pastebin.com/714385
<10> please
<10> so we aren't allowed to initiaze a member
<10> initialize
<9> iirc you can only do that if it's const
<7> javaq, you can only do that if it's a static integral constant
<7> initialize it in the constructor
<10> :(
<10> const int per; // is this valid?
<10> sorry
<10> const int per = 100; // is this valid?
<10> YUY0x7: thanks anyway
<7> no, it's not
<7> (as a member declaration)
<10> so weird coz some of my teachers example codes
<10> he initialized it as a member
<10> i'll show you
<7> your teacher might not be teaching c++ then
<11> iT WORKS WITH SOME COMPILERS
<11> Oops
<11> :D
<11> (but as YUY0x7 kind of hinted, it makes much more sense to make it static)
<12> km
<13> mornin'g all
<11> Looks like someone got lost
<13> me?
<14> not quite a morning, but please yourself
<13> :o
<15> hello all
<15> i have a question i want to put in startup mode in win to run a .exe
<15> somebody can help me ?>
<11> You mean have an executable launched when windows boots?
<15> yes
<11> Add it in the registry?
<15> yes
<11> Good, any other question?
<15> no
<15> that is only i want
<8> hahaha
<8> MrAshe : i feel bad
<11> Take an aspirin
<15> how i can do that?
<8> for you :P
<11> RegCreateKey, etc
<8> regedit.exe
<14> La`MisTo|ON : do you want a program to do it, or just to do it once manually ?
<15> no a program
<15> i want to be create myself
<8> nm then
<8> or...
<8> i'm gonna leave before my head blows up.
<15> so startup entry to the Registry to run exe
<15> i can do that?
<16> yes
<15> how :)
<11> RegCreateKey, etc
<8> [07:17] <15> i want to be create myself
<15> k
<15> thx
<8> if that's the case, regedit might be easier.
<15> i forget the regcreatekey etc..
<15> :_
<8> i still don't know what you're asking, really..
<11> Not like he knows better
<16> you need to read your manual
<11> man La`MisTo|ON
<15> yes?
<16> reading/writing the registry isnt tough at all, but if you've never done it before it's a bit tricky..
<11> " La`MisTo|ON is deprecated "
<16> there's great stuff to read about it
<11> There's nothing tricky about programming
<11> Except maybe dealing with JBlitzen in #c++


Name:

Comments:

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






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

abaclia
#MissKitten
#javascript
linux codec dump
SHINGO SHINGUERO
steptoes horse
php tools mysql slow queries benchmark
anti kiloger
#javascript
#london



Home  |  disclaimer  |  contact  |  submit quotes