| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Comments:
<0> bealtine: can you copy & paste your previous msg, because i was kicked :-s <1> why would you have an extern in a cl***? <2> i wants to have a global cl*** in my whole project <2> so i can access it from anywhere <0> i wish to write a dll that exports a cl***. <1> <1> and exporting cl***es from a dll is compiler specific and other languages/compilers wont understand it <3> Time to talk about COM or plain interfaces <1> really you should flatten the interface <2> so its possible to make a global cl*** ? <4> dr3f: duh, you're talking of a variable, actually. <2> i tryied to use namespace's its not works <2> _m_,what i'm trying to do is to declear a global cl*** <4> cl*** A; <1> apart from some issues with initilisation a global cl*** is no different that an int <5> What is the best compiler for a beginner? Been using DeV c++, but im sort of finding it pretty hard.. A friend of mine is using Borland, which looks pretty easy to use. Whay you think? <0> yeah, i want to use polymorhpism to do the plugins, so the dll exports a cl***.... and there you have it
<3> Borland is ghaey <1> borland is utter crap <4> Magnus-: You're probably talking of the IDE. Compilerwise, Borland is *way* harder to use. <2> cl*** xcl*** { ... }; extern xcl*** g_cl***; <2> ^^ what i trying to do <4> that looks right. <2> msvc dont recunize that cl*** <2> even if i put #include's <1> so in one of the .cpp just declare it <4> calc extern <6> extern = How to declare a variable in one file and use it in another: <http://www.gnomesane.net/code/extern/> <4> read that link again., <2> bealtine,i trying to declear it in the .h file <1> see link <4> Yes, you did. Successfully, even. <2> yes i saw that page <4> Now read the second to last line of that page. <2> another problem is,if i wants to access the global cl*** <4> duh <2> from a subcl*** of the maincl*** msvc generate problems <2> errors <4> You're talking of a VARIABLE. <2> no varible <5> Well. If I want to design my "program", it looks to be way easier in borland.. Editing the graphics on the windows console.. <2> CL*** <4> YES <1> YAWN <3> WOOT <4> g_cl*** is a variable. <2> varible which type cl*** <2> its a cl*** <4> No, it's a variable. <4> xlc*** is a cl***. <2> whatever <2> lets say,i wants to make g_cl*** to be global <2> and access it from anywhere at my project <2> msvc dont allow me that <3> type g_cl***; // one .cpp <3> extern type g_cl***; // other .cpp's <4> "whatever" is exactly the kind of attitude that makes C++ so hard to understand for some people. <3> There, done <2> _m_,sorry i'm c++ newbie <1> anybody want to invade Sweeden for me? <2> i dont know the lang very good <1> no **** <0> :)) <4> dr3f: then you should stop telling other people they're wrong. <2> indeed <2> sorry again <7> how did they compiile the first compiler? <4> GNUkid: they wrote it in ***embler, likely. <3> With an egg <1> with little switches <1> and gnomes <0> so, for my problem, i could use a function that returns a pointer to the specific cl*** (sth like function newinstance() { return new mycl***();}, and export that from the DLL? <3> Yes MrMuscolo <0> my problem (the plugins) <7> who konws about the plan 9 os? <2> hell : error LNK2005: "cl*** MainCl*** g_main" (?g_main@@3VMainCl***@@A) already defined in GlobalCl***.obj <2> what shuld i do to avoid such things ?? <0> but i'd need to access some of the static members of the cl***, before constructing it... to ask some questions... is this an x type of plugin? if so, create it. if not, ask the next one...
<3> struct plugin { virtual void release() = 0; virtual void dothis() = 0; }; extern "C" __declspec(dllexport) void create( plugin *& obj ) { obj = new pluginimplementation; } <2> the linker generate the error :/ <3> struct pluginimplementation : plugin { void release() { delete this; } void dothis() { .. } }; <3> There, you have your cl***es exported <2> but the linker dont allow it <0> <0> but i'd need to access some of the static members of the cl***, before constructing it... to ask some questions... is this an x type of plugin? if so, create it. if not, ask the next one... <4> dr3f: don't #include .cpp files. <3> p*** what you want to the exported function, MrMuscolo <0> for that i'd have to write a function for each question... <4> And follow the instructions at http://www.gnomesane.net/code/extern/ <2> _m_,i only include .h files <0> i'm asking, how can i access some of the static members of the cl*** before creating it like this <4> It can't be *that* hard to replace 'int' with 'xcl***'. <0> because the plugin manager shouldn't create a plugin cl*** unless it corresponds for a particular purpose... <2> _m_ it is :(,at least for me <3> MrMuscolo: void create( plugin *& obj, arguments ) { if (arguments.blahjblahblah) obj = new pluginimplementation; } <0> hmmm... good point :P <0> but still not quite as i'd want it... <0> that prevents some flexibility. maybe one plugin manager would want to load it if some properties are set, and another would want to load it if other properties are set... <3> You're not making much sense <0> i aint? :p <0> sorry <3> How about <3> void otherexportedfunction_getinfoaboutheplugin( infocl*** & info ) { fill it here } <0> yeah... sth like that... <0> so there is no way to directly address the cl***. <0> thanks <0> can static members be virtual? <0> they can't can they? <8> what does your compiler say? <0> didn't try yet... <0> rror C2216: 'virtual' cannot be used with 'static' <0> :d <8> seems pretty straightforward <8> which version of vc++ you using? <0> yeah ... but would be useful <0> 2005 <8> the problem, of course, is that you don't have a "this" ...and a vtable pointer when calling static <8> so how would it know? <8> and what advantage would static bring you anyhow? <0> can cl***'s static member's value be other then it's base cl***'s? <3> Not sure why you want it static MrMuscolo <0> i'd want to have a static member in a base cl*** called (dword) PluginType. and every cl*** that inherits from it would set plugintype to whatever they want it to. then using polymorphism i'd like to know what kind of plugin i am dealing with <0> so. cl*** a { static dword plugintype; } a::plugintype = 0; cl*** b : public a { static dword plugintype } b::plugintype = x; <0> a *x = new b(); b.plugintype =?? <0> a.plugintype =?? <9> MrMuscolo: one way to solve that is to create a cl*** that represents a cl*** of yours <3> He's trying to make plugins, but he's doing it completely wrong <9> (a cl*** would be an instance of that super-cl***) <3> (from a design point of view) <0> Ashe`: why? <3> Because you're not doing it completely right? <0> you said that before. but how should i do it then? <0> Ashe`: what do you recommand? <3> What are those plugins for <0> Well, they aren't actually "plugins" more like "modules" <3> Ok <3> What are those modules for <0> 1 mmnt <0> i have a module, that receives a series of signals, i call it the "driver". the driver(s) communicate the signal to the first "signal handler", that can handle the kind of signal received. the signal handler, the signal handler tells the "action manager" to take the appropiate action for the identified signal <0> hm.. wrote the signal handler twice... oops <0> do you understand it at least a little bit? <7> ASHE OMG UR SOOOOOOOOOOO GAYT <7> ASHE STOP TALKING TO IN PM,, NO I DONT WANT YOU TO **** MY COCK <7> GET OFF ME HOMO <7> CHEEZXUS <7> CHEEZUS <10> GNUkid shut up already <0> ok... that was wierd <10> quite <0> Ashe`.....? <0> pls say sth, i gotta go.... :( <3> Your explanation is a bit too much.. abstract
Return to
#c++ or Go to some related
logs:
pantherebel flikrbooty #linux #MissKitten london waether can't ping from cisco router #MissKitten canoscan 3200F ubuntu #windows #chatzone
|
|