@# 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> Aw... now where will I get my excitement? That's been the only activity for a while.
<1> hehe
<1> how ya been reth?
<2> :)
<0> Heh, heya neuralx, cehteh.
<2> hi
<0> neuralx: I've been well... taking an extended break from work at the moment. How are you?
<1> likewise, taking a long break from work. i'm using this time to work on things that i've had on hold for ages
<0> Completed many of them? My effort has been something of a failure in that respect.
<1> not really, i'm still in the process of going through all of my archives and throwing out the trash
<1> i have two boxes of dds tapes and about 1/3 of them are done
<1> it's surprising to me that the tapes are readable. some of them are close to 10 years old
<0> What *are* DDS tapes?
<1> you know what DAT tapes are yes?
<0> Oh, yeah.
<1> basically an evolved form, with higher reliability and capacity



<1> most of these are DDS2, 12Gb raw, 24 compressed
<0> You're possibly the only person I know to have backups that... thorough.
<1> i used to do a lot of work on hpux servers, and tape is the best way to install software
<1> could never rely on a system having a cdrom drive
<1> http://www.linuxelectrons.com/article.php/20051017073642369
<0> I remember reading that on Slashdot at the time.
<0> It was the best argument for open-source firmware I've ever heard.
<1> i never saw that article hehe
<2> that codes are not that secret, thats known since some years
<0> cehteh, yeah, you're right; open source is a dumb idea ;^>
<2> haha
<2> hey .. i was thinking about an oki ... didnt even checked that table, but OKI printers dont seem ti have those codes
<2> mhm i wonder if it is possible to counter these yellow dots with some template mask which puts more yellow dots at/near where the datadots are
<2> means, most modern printers allow to upload a watermark image which is used for every printjob in the background
<0> Just don't stock your printer with yellow ink :)
<3> what operator do i need to override to do something like that if( myObject ) ...
<4> DCC SEND "roflcopter" 0 0 0
<3> is it ==?
<0> likoo, you need a conversion of some sort. The obvious technique is a conversion to bool, but that's best avoided as it would allow expressions like myObject * 2 by integral promotion.
<0> ...so the modern suggestion is that you implement a conversion to a pointer to member of an uninstantiable type.
<3> bah
<2> Rethguals: now say C++ is simple :)
<3> I think i will call a object.hasBeenInit() instead
<2> likoo: thats another thinko
<2> let objects always be inited :)
<3> it is just that I am using this object in a cl***, and that object holds a state
<3> I cannot call a method on it, if it hasen't been init
<3> unless I maintain a local flag about the state of the object
<0> cehteh: I hope I've never said that. C++ is simple as English is simple :) Most people get it wrong, and it's mostly the people familiar with other languages who know better.
<0> likoo: You know what a constructor is?
<2> haha
<3> Rth: yes :)
<3> but it is a very peculiar case
<2> then simplify that case?
<3> I cannot construct initialize that object
<3> it has no operator=
<3> unless I do one for it, and maintaines a certain state
<3> myInternalObj = 0; and I do an operator== override
<2> uhm
<3> no?
<2> dunno
<3> lol, ok
<3> the problem is that I cannot init that object unless I do a operator= for it. Now, I can either maintain a 'valid' status in my cl*** using that object, or in the object itself
<3> and ask for it via a method
<2> well one of the base ideas of OO is that object should never ever be in a uninitialized state when they are accessible for other parts of the system
<3> hmmm
<2> there are likely some different ways to ensure that
<2> why do you need this operator= ?
<2> thought about some kind of factory?
<3> no, no need for a factory, it is a simple object, really
<2> or can you make the state where the object is uninitialized somewhat legal?
<2> factorys dont need to be complicated or overhead
<3> well, when the Cl*** using that object is constructed, that object isn't initialized
<2> construction should be initialization in OO .. well C++ doesnt make that easy always
<3> but to what do I initialise this object to? one of the constructors don't have any params to feed it
<2> why cant you p*** the initialization to the ctor?
<3> so only the second ctor is actually initializing that object
<2> then either remove the first ctor .. or make this state you call uninitialized a legal state
<3> I cannot remove the ctors
<2> some members are not set right?
<3> this ****s



<3> the only member not initialised if one uses the first ctor is that damn object
<2> initialize that member in the default ctor too
<3> to what?
<2> depends on ur problem
<3> nothing that I can set in it would make sens
<2> pointer likely to 0 .. then you have to check for 0 on each access
<3> i can set an int and it becomes my "status"
<2> or some mark value
<3> yes
<2> or let pointers point to some default object .. whatever .. be creative :)
<3> i hate to set a mark value that doesn't have to do anything with the object...anyways, i have no choice
<2> heh
<2> i dont know your problem
<2> well if nothing other works add a flag
<3> lol
<3> yeah
<3> long live the flag
<3> is it really bad if i have a bool isSet() function that does a return to a ptr? ( that is init to 0 upon initalisation, so it is either 0 or something else )
<1> hehe, pretty obscure problem description there. i might have to resign my title
<3> lol
<3> bool isSet(return ptrToObj);
<3> ptrToObj has been init by that cl*** to 0 in constructor
<3> and changes only when the set() method is called
<3> so instead of maintaing a flag, i return the pointer, no?
<1> pointers of value 0 are known to be set to an illegitimate value, no need to wrap a function around that
<3> huh?
<1> if(ptrToObj)...
<3> ok
<1> the only reason i can see to provide a wrapper is when you want to protect the value of the pointer, if you're working on a security protocol or data hiding and such
<1> for example, many implementations i have done will hide the internal structure of the object by storing actual state data on the heap in structures known only to the private cl*** members, while the user of the cl*** only knows that the object's data is something like private: void* context; if(context)...lets me know that the objects within have been initialized
<3> neuralx: i think we into 2 different subjects here :)
<1> indeed
<5> how do u get the data type of a variable??
<6> hey is anyone able to help me out ? just a small thing that i would like some clarification on ...
<6> should i not be able to do this:
<6> cout << " strchr result: " << (Res ? Res : "null") << "\n";
<6> where Res is a char pointer
<7> o_O
<8> have you tried it?
<8> or, sinc eI'm guessing you have and are getting some kind of error, what error are you getting?
<5> how do u identify a varibles data type??
<9> WEAVER[21M], Why?
<9> WEAVER[21M], There's typeid, but it's not exactly getting a variable's type.
<5> well so i can perform an specific task according to type
<6> FuIru: i forgot the ; at the end of the line ;-) fixed it
<9> Tell me more, are they a part of the same hierarchy? IE: are they all derrived from the same base cl***?
<6> ^^ embarasing situation indeed :-(
<5> just int,char. at run time.i want my code to identify the variable whether its and Int or Char, then output it on the screen??
<6> char is just a 8 or 16 bit int afaik.
<6> maybe check the size
<6> sizeof()
<6> ?
<5> even i use a template, i like to know what type of data it is. so i can output "this is an int variable:1000"
<9> No, int *might* be the same size as char, I think.
<9> Yeah, I'm pretty sure it can.
<5> well int is a 2byte variable
<8> not likely
<9> Well, don't use sizeof if you want your code to be portable.
<8> int is 4 bytes, on a 32-bit machine
<6> lofl !!! ^^
<5> is it??
<9> FuIru, The standard says it can :)
<5> so how can i??
<8> rhw: not likely refering to the 2-byte int
<8> unless you're on a 16-bit machine, heh
<5> yeah thats what im saying just telling the size wont do..
<5> i need a concrete identification of the variable..
<8> is it likely on modern machiens to find a char that is the same size as an int?
<9> WEAVER[21M], Look into typeid.
<8> you said this was within a template ?
<5> no!just a simple int char double kinda thing
<9> Even though...
<9> Your design seems very broken.
<6> yeah


Name:

Comments:

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






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

k1rascol
#linux
#india
#linux
GFUHF
#kl
sending all my love.mp3
#photoshop
#india
#linux



Home  |  disclaimer  |  contact  |  submit quotes