@# 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 11 12 13 14



Comments:

<0> I suspect Apocal` wants the pixels per inch
<1> yeah, and what "specs" are you talking about?
<1> pixel ~ dot
<1> soo... how do i get the dpi/ppi for the monitor?
<2> GetSystemMetrics
<2> this has nothing to do with c++
<1> thanks for the answer anyway
<3> perhaps you could get dimensions by inspecting monitor's driver (don't ask me how though)
<3> GetSystemMetrics will just return ppi settings in windows, IIRC
<4> Windows can't guess the size of your monitor
<4> Apocal`: specs == on the manufacturer website
<4> (or in your manual)
<1> yeah, i figured that, but i mean through code
<4> Windows can't guess the size of your monitor <=
<1> and on a monitor-by-monitor basis
<5> *** BY *** - basic network



<1> hmm, this is a tough one
<6> Apocal` - what use is the dpi / size / whatever?
<6> trying to draw something to scale?
<7> can some help me with the following error: ISO C++ forbids declaration of `map' with no type
<3> Apocal` maybe allow the user to enter ppi in options
<1> high resolution monitor
<3> photoshop does it that way
<6> WonderMop - how about show us the erroneous code
<4> How does having a high resolution monitor matter
<4> WonderMop: missing template arguments?
<7> typedef map<std::string, std::float> StringFloatMap;
<7> which is defined in a namespace
<6> std::float ???
<6> and it's std::map
<2> std::float?
<7> oops
<3> lol
<4> namespace std { typedef float float; }
<4> Yay
<7> doih!
<7> i am such an idiot
<7> i pasted it in the wrong spot
<6> yes
<2> always happens when you paste code in here
<7> lol
<7> thanks guys
<2> press copy and doh! you see the error
<7> wow.. that was dumb*** simple :)
<7> is this channel always open?
<6> virtually
<7> excellent
<7> one more question
<8> calc q
<9> q = We are able to recognize a properly asked question even without the word "question" introducing it.
<10> who is your daddy and what does he do?
<6> heh
<6> get to the choppa!
<10> ;D
<7> let's say I have a templated cl*** which gets p***ed two arguments. what is the test to see the type of the arguments?
<8> huh?
<6> you don't p*** arguments to a cl***
<6> you p*** them to a function
<8> by "templated cl***" he meant "call template". Those *do* get p***ed arguments.
<7> but the constructor can take arguments...
<7> *confused*
<8> s/call/cl***/
<6> you want to template the cl*** based on these arguments?
<7> yes
<7> (that make sense?)
<6> template< typename T, typename U> cl*** A{ );
<7> i got that already
<6> template< typename T, typename U> cl*** A{ A( T const& t, U const& u ); };
<7> i must be explaing it wrong
<6> there's a constructor that takes one argument of each type
<4> Such a chaotic placement of the tokens
<8> WonderMop: yes, nobody understood your question, I guess.
<4> typedef std::pair<T,U> A;
<4> hohoho
<7> ok... i have the template< typename T, typename U> in already, but i need to be able to get the types of T and U so I can use them as conditions for comparisons.



<6> then you're likely thinking about the problem wrong
<7> ok
<4> Conditions for comparisons?
<6> you don't usually do things like if( T == int ){ ... } else if ( T == float ){ ...
<7> Ok... I need to check (let's say) if U is int, float, whatever and use it...
<7> agreed rd.
<7> hence my confusion
<10> why do you need to know what type it is?
<6> why does it matter what type it is?
<11> WonderMop: The point of template is that they are supposed to be used with any type.
<6> and, in the case that it does matter for a spcific type, you can use specialization
<8> WonderMop: you have to specialize the cl*** (or the member functions) then.
<8> You don't compare types directly.
<7> Agreeed DM, but I need a little finer control.
<4> Or just use numeric_limits
<11> Like _m_ said, specialization.
<8> (unless you have mechanisms for type comparison like boost.mpl)
<6> maybe templates isn't the tool for the job, then
<7> ah... i have boost... it can extract the type?
<12> on join: -Gloria22- DCC send BecomeIRCOP.rar (84.121.84.221)
<11> You can extract the type if you ahve Runtime type information enabled, but it's to be used as a last resort only.
<4> Hey, I wanted that file :'(
<10> extract the type.. what are you talking about..?
<4> RTTI is worthless
<7> uugh
<11> WonderMop: Why don't you go into the specifics of your problems, so that you may bask int he channels design wisdom.
<7> OK.
<7> ok dm
<7> i have a templated cl*** which accepts 2 inputs (T1, T2)
<7> all I need to do is (within the cl***) extract the type of T1 and T2
<13> Why?
<10> what does "extract the type" mean??
<6> that's not the problem, that's your solution
<7> ok.
<7> i know r :)
<6> well, then tell us the problem
<7> that's why i am here. i do not know how to determine the type of a templated variable within the cl***..
<6> sigh
<6> what in hell are you trying to DO?
<6> and don't include the word 'template' or 'cl***' in your answer
<7> ok
<7> argh
<7> i need to sort data (key pairs) which contains arbitrary type and store them into maps
<7> i have about 200+ maps for sorting
<8> ouch
<6> how do you sort data of unrelated types?
<6> and how is this data stored?
<7> the needed map is read into memory after decryption
<7> and the structure is (key, value)
<7> where both the key and value can be ANY type
<6> "is read into memory after decryption"... from where?
<7> no comment
<13> But presumably a type defining an ordering relation, or they couldn't be sorted
<6> how do you plan on sorting a string and an integer?
<7> rd, i cannot say
<7> sorry rd
<6> then what the ****?
<7> :(
<13> And as rd says, an ordering relation that's datatype agnostic
<13> which is something I'd like to see
<6> somehow you're reading this stuff into actual C++ types?
<7> yes
<7> (I can say that much)
<6> why can't you say?
<4> Yet another "I think what I'd doing is top secret"
<7> long story
<7> sorry
<7> nope
<7> not gvt work
<6> is this for your job?
<7> there's a contract, that's it
<7> sorta


Name:

Comments:

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






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

#apache
jedit sftp exception
#asm
#php
#javascript
aaaaaaaaaaaaaaaaaaaa
turbogears frameset
#squid
#php
femiliar linux



Home  |  disclaimer  |  contact  |  submit quotes