@# Quotes DB     useful, funny, interesting





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



Comments:

<0> Hi all , is there any free C++ compiler for win. ?
<1> visual studio 2005 express
<2> Dev-C++
<1> "visual c++ 2005 express" rather
<1> i'm using it. seems pretty good. same optimizer as in the paid version
<3> http://www.bloodshed.net/
<2> what he said ^
<0> octogone > visual studio , does it take std C++, or is it C++.net ?
<3> :)
<0> does my program need .net framework , in the client side ?
<2> love blooshed
<2> *blood
<1> i'm using standard c++. i think c++ & .net == c#?
<2> hmm
<0> no
<1> no, that's probably wrong. in short, i know nothing of .net



<0> C#.net is a new programming language , that is made by microsoft to compete with java
<0> it have nothing to do with C++ or C++.net
<2> visual studio 2005 is .net i believe, but i think you can still code straight C with it. as in it will compile it just fine.
<2> if your just looking for something quick and clean with no IDE use Dev-C++ with the bloodshed compiler
<1> i might have the .net framework installed. it may have been a requirement. however, i'm not using any .net features
<0> but i am afraide in forcing the client of installing an updated version of .net framework
<1> don't recall, sorry
<2> it wouldnt
<2> as long as you dont link+compile it with any .net features, it wont require .net runtime
<0> .net framework is installed with winxp. , and a newer version is installed with visual studio 2005
<0> findingOhio> Dev-C++ (downloading ...)
<2> well .net 2 was a windows update not to long ago
<0> thanks
<2> np
<0> yeah , winxp sp2 , comes with .net 1
<1> is there a name for using a series of templated functions to forward variadic-style arguments to another function? example: a factory providing constructor forwarding so the user can call any of his objects' constructors without adding methods to the factory: template <cl*** A1,cl*** A2, ... cl*** An> T * construct(A1 a1, A2 a2, ... An an) { return new T(a1, a2, ... an); }
<1> that's just psuedo code, of course, and would be replaced with a series of templated functions up to a fixed number of possible arguments
<4> "forwarding functions"
<5> son of a bitch!
<5> literally
<5> that ****ing dog downstairs won't stop barking
<4> They're a big pain in the arse in C++0x, because each parameter needs to have an overload accepting a T& and another accepting T const &, so for an N-argument function, 2**N overloads are required.
<4> ....except where something like boost::ref is acceptable.
<1> yikes!
<1> 2**N is not a small number. 2**N is a big number!
<4> Well, yeah. If you have a pointer to the function you wish to call, you can do better. If you have just a name, you can't deduce the types required because you could be talking about a set of overloads.
<4> That's the case in the example you mentioned, of constructor forwarding.
<1> hmm, distain for C++0x. also, i'm not looking forward to people trying to pronounce it
<4> Er, when I said C++0x, I meant C++03. 0x fixes it so that no more than N are required (each parameter being T&&). Varadic templates may well be introduced.
<4> People will call it C++09 when it's done.
<1> i certainly hope varadic templates make it in. i've barely scratched the surface of tmp and already i'm knee-deep in emulating them
<4> There was a proposal for them, but it was really quite horrible, and it soured people to the idea.
<4> It involved getting the compiler to instantiate std::tr1::tuple at compile time and do various other stunts that compiler writers would find nearly impossible.
<1> hey, where do you read about all this breaking news on C++0*?
<4> The committee reflectors.
<1> indulge me? a reflector is something beside my turn signal :)
<5> :)
<1> id est, i have no idea what you're talking about :)
<4> Actually, the tuple discussion I'm talking about happened at the meeting in Kona in October 2003.
<1> is there a website or a newsgroup that you prefer?
<4> octogone, members of WG21 communicate mainly by e-mail distribution lists, known as "reflectors"
<1> ahh. i gotcha
<4> http://www.open-std.org/JTC1/SC22/WG21/
<1> thanks. bookmarked for when i get up to speed
<1> i've implemented varadic constructor forwarding for my non-polymorphic product factories (meaning that i can create a new constructor (int,float,string) in my product cl*** and call factory.create(123,4.5,"six") without having to tell my factory about the new constructor.)
<1> my polymorphic factories (which take an int IDs to determine the type of the object created) currently keep a std::map of IDs to pointers to functions which create new derived types. this means i'm only able to call the default constructor, unless i provide a map for each type of function pointer (i'm not even sure this would be possible) and register them all individually.
<1> i'd like to provide variadic constructor forwarding for my polymorphic factories, but i can't figure out how to do it. i keep running into the restriction that "member function templates cannot be virtual".
<1> any advice would be much appreciated! i've been banging my head against this for a while :)
<4> You'll need a different way to map integers to types.
<1> yes, of this i am sure :)
<4> Actually, think of it this way: how can you ensure that your polymorphic type supports the constructor you're trying to use?
<1> i'm not sure i understand what you're getting at. if the type doesn't support the constructor, i'd like a compile-time error
<4> ...so the 'int' is known at compile time?
<1> er... no
<4> Then you're going to need to know every constructor that you'll use at the point that you register it, and to have one registration function per ctor overload that you wish to use.
<4> It's as simple as that.
<1> aww. my hopes and dreams :(
<4> You either need a way to map to a compile time type at the point of construction, or a way to store things you'll need access to later at the point of registration.
<4> Otherwise, you have a situation where you don't have a means to do what you want and don't have enough information to generate one.
<1> it just doesn't seem like it should be very difficult: if i had a map to CreatorBase objects which provided templated virtual methods (not allowed), then derived Creator<cl*** DERIVED> methods could be called
<4> Oh yeah, it would be easy if you had a feature which doesn't exist.



<1> haha. indeed :)
<1> honestly i don't see why that feature doesn't exist :/
<4> That's an FAQ.
<4> ...and the answers are obvious and dull, like the complexity of recovering uses from all translation units to figure out the templates that need instantiating, and the impossiblity of it working with DLLs, etc.
<1> oh, really? i only get 37 google results for my compiler error "member function templates cannot be virtual". point me to a FAQ please? :)
<1> obvious to someone with experience with these things perhaps. i understand that it would be complex, but haven't worked with DLLs
<1> thanks for your time :)
<4> Pfft. When I said it's an FAQ, I meant that it's a question I'd heard asked a lot.
<1> oh. i thought you meant that it could be found in online FAQ lists :)
<4> It probably can, but I'm not going to go searching for them. The reasons why they can't exist are obvious.
<4> Or rather, they're obvious for compilers without support for export and with support for dynamic linking.
<1> i'm satisfied with your answer, thanks. thought you were brushing off the question by telling me that it should be easy to find the answer on an online FAQ
<4> The basic problem, with both your factory and template virtual functions, is that *conceptually* there are an infinite number of possible arguments, and you can't reserve a space in the v-table (or map, in your case) for all of them
<4> ... and if you could, wouldn't have time to instantiate them all :)
<6> can i get help?
<4> The solution is to know which functions you'll actually need ahead of time. This is /conceptually/ possible within a single target in the case of template virtuals, but isn't as soon as you have DLLs allowing foreign code to use or provide additional signatures.
<1> well, it seems to be working fine for my non-polymorphic types :)
<4> octogone, in that case, you have all the information you need at the point of the call.
<1> true
<4> Well, that's the fundamental difference. It's what I said earlier:
<4> [15:04] <@Rethguals> You either need a way to map to a compile time type at the point of construction, or a way to store things you'll need access to later at the point of registration.
<1> that makes perfect sense
<1> i'm glad you repeated that, it clicked this time around. i was planning on going back and reading this conversation over in a few minutes anyways though
<1> thanks :)
<7> yawn
<8> hey i was wondering if anyone could spare me a few minutes, im trying to implement a circular doubly linked list using the STL, I've tried google didnt really help me, all ive managed to do is get a singular linked list to work using it. Any help is welcome.
<7> gizm0__, Why don't you just use std::list ?
<4> It's not circular? :)
<7> oh
<7> Well, actually, I wrote one a while ago :)
<7> http://cppcorner.3x.ro/articles.html
<8> cool thanks
<7> You're welcome.
<8> :)
<7> gizm0__, I skimmed through it - it's been years since I wrote that - and apparently, it doesn't have all the functionality of a real STL container, but as far as I can tell, it's not very hard to implement it.
<8> ahh right
<7> http://cppcorner.3x.ro/articles.html
<2> good stuff rhw
<2> any ways to check how many places are in an INT? example: [ int NUM = 453; cout << someFunction(NUM); ] (3)
<4> You mean decimal digits?
<2> yep
<4> log10
<2> that uses math.h right?
<4> Well, ciel(log10(i))
<2> right, gotcha
<4> math.h or cmath
<7> findingOhio? What?
<2> your faq and articles
<7> oh
<7> Probably; I had a clue about C++ back then, unlike now. :)
<9> WHERE YOU HAVE A CLUE ABOUT NOTHING!!!
<7> heh
<7> Hey Xiph.
<9> morning
<2> Rethgauls: thanks
<9> I gotta go soon
<4> findingOhio, ciel is wrong, btw. It should be floor(log10(abs(i)))+1.
<2> 'ceil' works
<4> Try 100.
<2> k
<2> Rethguals: both work perfect, well on INT anyways.
<9> that's what you think
<9> muwah ha ha ha hah hahahahaha....
<4> 10^2 = 100 => log10(100) = 2. ciel(2) == 2.
<10> But, will findingOhio ever really know whether his algorithm...... works?
<10> Work or not, he'll sure spend the rest of his days in.... the Twilight Zone.
<4> I thought you were comming on to him.
<2> i was hoping
<2> i mean... ew
<9> Nah I'm just being crazy, as usually.
<9> No simple complicated explanation is necessary :]


Name:

Comments:

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






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

mermid 1
#php
#allnitecafe
#allnitecafe
kirch is gay
#allnitecafe
#chat-world
girlsneedfun
embun salon
layalena chat



Home  |  disclaimer  |  contact  |  submit quotes