| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12
Comments:
<0> How about you paste the first one <1> sure <1> MTComm Example.obj : error LNK2019: unresolved external symbol "public: short __thiscall CMTComm::setDeviceMode(unsigned long,unsigned long,unsigned char)" (?setDeviceMode@CMTComm@@QAEFKKE@Z) referenced in function "bool __cdecl doMtSettings(void)" (?doMtSettings@@YA_NXZ) <0> Where's that method defined? <1> setDeviceMode ? <0> Duh <0> Hint: probably mtcomm.cpp <1> yes. <0> So you have that file? <1> yes <0> But it's not part of your project <1> i havent added it <0> Maybe you should <1> but I have got a line : #include "MTComm.h" <0> Doesn't matter <1> still need to add MTComm.cpp?
<0> Yup <0> That's where the code is <1> sooo....if i have a #include statement - does it look for the .h file by default in the project directory? <2> if a method in a cl*** is virtual, must all subcl***es override it? <0> Nope thekeit <2> ok, if i want to subcl*** an object, say.. [RenderObject]<|--[Light], where RenderObject has two constructors (RO(); and RO(Vector x, Vector y, Vector z);), and Light has two constructors also (Light(Vector position), Light(Vector position, Vector x, Vector y, Vector z)), how can I make it so that when one of Light's constructors are called, the supercl***' constructors are called for the majority of the objects' contends? <2> contents* <2> e.g. Light(position); calls RenderObject();, then also sets position in the Light object <2> and Light(pos, x, y, z) calls RO(x, y, z); then sets pos in the Light object <3> initialiser list <3> Light(param) : RenderObject(...) <3> where ... are the parameters to p*** <3> so your whole constructor might be <3> Light(param) : RenderObject(param) {} <2> ah, so : RenderObject(param) is basically like java's super(param); ? <3> pretty much - but it's not part of the function body, it goes on the init list <3> in a similar way that "super" must be the first call ever made in a constructor. stupid java <2> yeah.. heh <2> so.. Light(Vector position) : RenderObject(position);? or RO(Vector position) <2> ? <2> the former, mm? <3> the formar <3> er <2> what if i want to call the default constructor in the same cl***? <2> RenderObject(x, y) : RenderObject() {} ? <0> You sort of can't <0> new(this) RenderObject(); would work, but it's ugly <2> i see <3> if you have common constructor functionality, hive it off into a private function and invoke that from the constructors <2> i c <2> :> <3> be wary of doing too much work in the constructor though <3> ideally, it shouldn't do any "real" work <2> yeah.. all my constructors do are set things <3> and make good use of initialiser lists over constructors <3> i.e. prefer initialiser lists to constructor bodies for just ***igning stuff around <2> oh? <2> so if ihave.. SceneObject() which has properties int shininess, int opacity <3> cl*** Test { int someMember; Test() : someMember(5) {} }; <3> rather than <3> cl*** Test { int someMember; Test() { someMember = 5; } }; <2> SceneObject(int shininess, int opacity) : shininess(shininess), opacity(opacity), RenderObject() {} ? <3> yup, but I'd vary your names (or use explicit name resolution <3> otherwise, confusion will occur <0> And the parent constructor shouldn't be there <2> oh? <3> if it's the default, theres no point <0> And it should be first <2> well the parent's default just sets default values of the parent.. <3> indeed. the order matters <2> or does that get called automatically? <0> Yup, it does <2> ah ok <3> grab a copy of Effective C++ (http://rudbek.com/books.html) <3> full of useful stuff like this <2> cool <2> regarding initialising instance vars - e.g. Ctor(int x) : init(x) <2> what should init be? the name of the local variable? <3> yup <3> your effectively "constructing" that variable with those parameters <2> ah. how does that deal with pointers? because previously i was using this->shininess = shininess;
<3> same syntax will be fine <2> shininess? nawww :P <3> bleh, I should be typing notes and I'm just wastingtime <2> i do that lots... <2> thanks for your help guys :) <3> no problems <3> Effective C++ would be a good buy though, and it's actually an easy read <3> next time you're amazoning something, stick it in the basket :) <2> easy read? good. im sick of bogged down textbooks :@ <3> if you're writing for modern hardware, just store specular information and opacity information in a seperate map <2> mrashe: almost, writing a raytracer, so kinda byp***ing gl calls <3> then you can write a trivial 10 op shader to actually implement it <3> ah. raytracing <3> even more fun for pixel shaders :) <0> Depends, if it's GLSL it's far from fun heheh <3> well, in a raytracer, your pixel shader can be C++ <3> unless you're offloading some of the math to hardware <3> a real callback for every pixel at every phase of the pipeline, with all the context <4> Off to office <3> oh wow <3> finally got another contractor to send me though the backend code for a website I'm ment to be specing <3> and the example PHP is....dear god <3> 8 lines into it, there's a security hole the size of texas that would let me destroy their entire database <3> 20 lines later a security hole such that I could read any file off their disk <2> lol <2> oh my <5> how can i shut down computer (win xp) via c++? <3> ShutdownWindow*** <3> ***uming you have enough priviledges <5> #include <what> void main() { ShutdownWindow***; } ??? <5> that way? and what do i need to include? <5> i`m just curious <3> windows.h, as with 99% of winapi functions <3> see msdn.microsoft.com for more <5> #include <windows.h> void main() { ShutdownWindow***; } <-- that`s all? <3> Er, no <3> I suggest getting the first book on the list at http://rudbek.com/books.html <2> what does 'the following virtual functions are pure within Light - virtual Collision RenderObject::getCollision(Ray)' mean? mainly the pure part? <5> is a long code the shutdown one? <6> pfft, codeplex beta doesn't allow project creation without having a review process <6> also needs better profiles <0> thekeit: the =0 <2> the =0? <2> hmm <2> i just want to have the template for it in the RenderObject cl***, so that i can override it if necessary in subcl***es <0> Then remove the = 0; <2> but then do i have to implement that in the parent cl*** <2> ? <0> Yup <2> hmm. <2> i need to.. not implement it there:P <0> What's that template thing you're talking about then <2> well, all RenderObjects need a getCollision method <2> but.. theres no generic way to do it so they all need to be specific <0> Sure there is <0> The generic way is there's no collision <0> Heheh <2> oh i see :) <2> is there a c++ substitute for scanf? <0> cin <7> 'morning <8> hi <9> i need something like a priority queue, but every once in a while i need to trip the bottom of the queue, remove the smallest element to maintain a fixed queue size.. <9> what STL container should i use? <2> vectorbanger <7> trip? <9> trim <2> question: what would cause a struct to lose some data from being returned, to being ***igned again (Collision res = returned struct; ) ? <9> currently i am pushing all the elements into a vector, sorting them, and them truncating the trailing entries, which constitutes 95% of all the data,, <7> And priority_queue<deque> doesn't work? <2> the data in question is an int
Return to
#c++ or Go to some related
logs:
+djdecompiler +download couples slow-danced to his dreamy eyes in 1962 mysql ilike ^witch^ undernet #linux al3k post-removal script returned error exit status 135 AVL tree aplications
#linuxhelp BYTE GetRValue(
|
|