no they wont
When I compile dlls using vs.net they work fine on other computers without
vs.net on
- Original Message -
From: Michael Shimmins [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 25, 2002 7:55 AM
Subject: RE: [hlcoders] Argh!
You realise that to play your
This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Is there anyway to make another isntance of an object by using another objects pointer
as a base?
So I mean like if I have:
CObject *ob1 = new Object(blah,blah,blah,blah);
and then I want ob2 to
A pointer is just a variable containing the address to a location in
memory, so it would be expected that assigning the pointer like that would
just make ob2 point to ob1. To do what you want to do, I would recommend a
copy constructor. You could also overload the assignment operator.
class
You should overload the = operator so you can simply do this.
CObject *O1 = new CObject( 0, 1, Hello );
CObject *O2 = new CObject( );
O2 = O1;
Now O2 is an exact copy with the same values but in a different location in
memory.
- Original Message -
From: Varlock [EMAIL PROTECTED]
To:
Is there anyway to make another isntance of an object by using another
objects pointer as a base?
So I mean like if I have:
CObject *ob1 = new Object(blah,blah,blah,blah);
and then I want ob2 to be exactly the same as ob2, is it possable just to
copy ob1? (i.e. dont need to write
What is .net ?? I don't know...
Also see this...
http://msdn.microsoft.com/library/default.asp?url=/vs/techinfo/default.asp
Jeffrey botman Broome
___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
How so?
I have already tossed DLL's to friends for testing, they are on ME/2k
and have
No problems playing.
-Ron
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Michael
Shimmins
Sent: Monday, February 25, 2002 2:55 AM
To: [EMAIL PROTECTED]
Subject: RE:
Oh yeah, another thing. What I am doing with the SDK is not for a MOD
etc..
I am just mucking with the code, using it as a tool to foster
learning/knowledge of C++
So, if it cant be deployed to others oh well then :)
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Um... No. You're assigning the POINTERS there, not the objects
themselves; the result would be both pointers pointing to the same
object in memory and the second object not being referenced by anything
(memory leak, actually).
What you meant is...
*O2 = *O1;
This is relatively safe to use, but
I've known of people that felt particularly daring and attempted to use
WINE, but that adds a level of dependency that might not be available on
every Linux server you install on. For my game servers, I don't even
bother installing WINE.
For my own mod, which uses INI files for configuration
That depends on how your copy constructor is set up. There are deep
copies and
shallow copies (they don't do the same thing). Take a look at a good book
on
C++ (I recommend Stroustrup's ARM, annotated reference manual). Look up
copy
constructor in the index for a detailed explanation.
Ah, I didn't know there were different types of copy constructors. I did
a search on the web to find out some more information on shallow and deep
copy constructors. If what I read was correct, the compiler automatically
implements a shallow copy constructor for your classes?
Yes, by
12 matches
Mail list logo