@# 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> my world is one big soduku
<0> sudoku?
<1> i love how i can irc and play games at work all day
<1> but still.. it would be nice to be working at a place where i got to make games.. :(
<2> i did that for one month
<2> doing nothing useful
<1> and?
<2> it's so boring
<2> i'm happy there something to do again
<3> why is this not allowed? any better way on doing the code? --> cl*** foo{ int n[] = {1,2}; }
<1> K_r3aPeR-, do you want to know why it's not allowed or just be provided with an alternate way to do about doing that?
<2> K_r3aPeR-: you can't initialise variables inside a cl*** definition
<3> ahh.. so it's not allowed, but how am I going to initialize it?
<2> the proper way to do initialisation is in the constructor list, but i doubt it will work for arrays
<4> that's what constructors are for
<1> yes, the only way to initialize variables is inside the constructor(s), and even then I don't think you can do that array init thing you ahev going there since the array is variably-sized



<3> yep.. i know it's not possible when u init it in the constructor
<3> or could I just create a different array inside the constructor and make n points to the temp array?
<4> K_r3aPeR- what are you actually trying to do?
<3> vawjrwrk, i want to have "const byte key[256] = { 0x00, 0xaa.. lotsa bytes here }"
<3> so I could use it inside the cl***
<3> im confused on how to actually do this right
<2> you could make it global if it's constant anyway
<4> I'd forget about puttting inside a cl***
<3> hrm? what if i'm using the cl*** for other things porting it? i'd declare the key[256] again as global on the other app?
<3> it destroys the purpose of the blackbox
<3> or what's it called
<2> i don't understand what you're saying
<3> wait.. i'll look for it
<5> is this right : Vl = mymap[key]
<5> ?
<2> Guns|n|r0s3s: yup
<3> ehe.. the thing called "Information hiding" more likely blackbox
<4> how many of these keys you going to have?
<1> well what about using static members?
<1> cl*** Foo { ... static const byte key[256]; } and then in some .cpp file: const byte Foo::key[256] = { 0x00 .. };
<3> hmm.. nice, thanks ImHungry
<1> you're welcome
<1> i'm here all the time, tell your friends.. i like to help not humiliate
<5> i put in the header file static __cObjMap_ _SCD_OBJ_MAP_; and in the cpp file extern __cObjMap_ _SCD_OBJ_MAP_;
<5> will the both _SCD_OBJ_MAP_ variables be the same
<5> ?
<1> what's with all these underscores man?
<4> do NOT use double _ in names
<5> why ?
<4> and do NOT use leading _ followed by Uppercase
<1> doncha know '_' and '__' are reserved for library and OS use respectively?
<4> because the standard reserves those to implementors
<5> well i am writing a library and i thought if i make that name convention
<5> i will avoid coalision
<1> use namespaces
<6> use a namespace for that
<4> that's what namespaces are for
<1> that's what they're there for
<5> and u didnt answer my first question , i mean if u could
<5> i use that too :)
<5> namespace X{ ____
<5> and its cuz these objects are very low in the hearchy so no one would use them so i let the non underscored names for a highier definition
<1> so what is your question? i mean static and extern (outside of cl*** defs) pretty much mean completely different things so the answer to your question is probable either 'no' or 'don't do that' or 'wtf?!'
<4> one usually puts externs in the header files and defines the variable in an implementation
<5> and that extern variable will be the same for all the modules who includes the headers ?
<1> yes, as long as you remember to actually define it in one and only one translation unit
<4> the extern simply says "somewhere there is something that looks like this"
<5> how to define the var in the implementations ? "mytype myvar;" ?
<1> yup
<5> nice
<5> danke
<1> gezundheit
<4> you really should read some good books
<5> is it legal to use a = sizeof(*this) ?
<4> yes, but why would you want to?
<7> legal but a bit pointless
<5> well it just to save typing work
<7> typing what?
<5> i mean
<5> keybord typing
<5> istead of making a = sizeof(myobj) i make a = myobj.mysize();



<7> why?
<5> for those who dont know sizeof
<7> sigh
<5> my collegues are not so smart in c+
<5> some have really few knowledges
<4> and if you're going to do that, at least use the same name as other things .size() not .mysize9)
<7> why would it matter?
<4> what are your collegues smart in?
<5> well true vawjrwrk
<5> Maths or thermodinmics
<5> dynamics
<5> mostly
<5> and STEP or Catia
<4> but .size() ususally is for containers only and usually returns the # of elements in the container
<7> sizeof (object) is not very useful
<5> well
<5> when u scroll through memory
<7> unless you are using malloc
<4> "scroll through memory" ????
<5> no i use new
<5> butsome of my collegue should not know what new is
<7> please explain, this sounds fascinating
<5> with pointers
<5> ptr = ptr + 1
<5> and so on
<5> i know where i use that
<4> you're writing a system for non-programmers?
<5> sizeof()
<5> well ya
<5> i am writing a library to an audiance that i cant presume its knowledge
<5> i c++
<5> so i try to take my precautions
<7> so why would sizeof be relevant?
<4> you would be better off using a language like Python, IMO
<5> well i used it mostly in Tcp/ip communucations
<5> i dont know how exactly but i used it a lot
<4> run time typing is quite useful for prototyping
<5> vawjrwrk: i dont know those languages
<4> you don't know C++ either
<5> well i manage
<7> manage to what?
<5> i just dont know some details and i dont like STL
<5> manage to do what i want
<5> with c++
<5> what is phyton for anyway ?
<4> "don't like the STL" .... silly person
<4> Python
<5> Python
<4> It's a language www.python.org iirc
<4> my scientist friends like it
<5> aha
<5> and it have good editors like Ms visual studio one ?
<5> i love that automatik inttelysence
<5> or what ever it is called
<8> intellisense
<5> ya
<7> w00t
<5> are there other editors who do that,
<5> sorry for my bad english
<4> one of my scientist friends put together a very nice Python IDE
<8> nomorequotes.com <-
<8> :P
<9> What is your native language Guns|n|r0s3s?
<5> German or French
<9> I don't think you call it inttelysence in either
<5> no
<5> it was from my own imagination that
<5> :)
<5> StaZ[home] www.nomorequotes.com ?
<10> http://www.notbored.org/camera-abuses.html
<8> Guns|n|r0s3s just a placee to put funny comments :P
<10> Guns-n-Roses, huh?
<10> There's a band I haven't heard about in a long time.
<11> yeah


Name:

Comments:

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






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

#linux
#linux
It works fine on MY computer It worked yesterday
#chatzone
#linux
tethereal port 1863
jscroller java
irssi unsplit
#networking
#mirc



Home  |  disclaimer  |  contact  |  submit quotes