|
Thanks Bram van kampen.
Perhaps you get me the meaning of.
//////////////////////////////////////////////////////////////////////////////////
e.g:
#include <extern.h>
#include <perl.h> /* from the Perl distribution */
static PerlInterpreter *my_perl; /*** The Perl interpreter ***/
int main(int argc, char **argv, char **env)
{
char *args[] = { NULL };
my_perl = perl_alloc();
perl_construct(my_perl);
perl_parse(my_perl, NULL, argc, argv, NULL);
/*** skipping perl_run() ***/
perl_call_argv("showtime", G_DISCARD | G_NOARGS, args);
perl_destruct(my_perl);
perl_free(my_perl);
}
//////////////////////////////////////////////////////////////////////////////
Im compile it, but return:
error LNK2001: unresolved external symbol _perl_alloc
How do i do?
By the way, I would like to document how PERL document will be added to the c + + project files inside?
TKS!!!
|
|
|
|
|
what is the difference of “class instance” and “object”?
thanks!
|
|
|
|
|
An object is an instance of a class.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
then, why does rational rose has two concepts:“object” and “class instance”?
|
|
|
|
|
WangZHua wrote: why does rational rose has two concepts
Rational Rose is one of the most irrational pieces of software I have ever tried.
|
|
|
|
|
I can't speak of another's opinion. Perhaps you should ask them.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Both are same if that object is of that class.
It will be different if object is a structure object.BCZ in structure bydefault data members are public where in class it is private.
In C structre---------->variable
C++ it will be considered as object.
|
|
|
|
|
all right,but,i think it is not perfect.
i think,object is the description of class,instance is the dynamic concept.
the method of object is description of class 's behaviour.
the method of instance is description of module ‘s behaviour.
is not it?
|
|
|
|
|
What language are you trying to disect.
An object is a lump of data that can be managed by a single handle, by whatever means, either by knowing th precice interpretation of the object, or by knowing how to handle it from the 'outside', and accessing it because you know it's type. A Class is a CPP construct, it is a Prototype, or blueprint of a cpp object.
an Instance (of a class or type) is an actual variable of the type, and as such, an object. All cpp instances are objects, Not every object is a CPP class instance. If you understand the underlying ideas, the distinction becomes trivial, and at the same time futile!
Bram van Kampen
|
|
|
|
|
WangZHua wrote: “class instance”
?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Is there an API to find the LAN address, (e.g, 10,1,10,4)on a very small peer to peer network (i.e. No DNS Service explicitly provided), and is there a way of associating such addresses to a Name.
regards,
Bram van Kampen
|
|
|
|
|
What about NetServerEnum() ?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
thanks,
Going to try that tomorrow. Looks promising.
Bram van Kampen
|
|
|
|
|
I typed in an example from the book "MFC Programming from the Ground Up", Second Edition. This example is the first example that shows an SDI application. On of the classes defined in the application is CSampleDoc which is derived from CDocument. They specify the following message map:
<br />
BEGIN_MESSGAE_MAP( CSampleDoc, CDocument )<br />
ON_COMMAND( IDM_UNDO, OnUndo )<br />
ON_COMMAND( IDM_RESET, OnReset )<br />
ON_COMMAND( IDM_HELP, OnHelp )<br />
END_MESSAGE_MAP()<br />
However, it does not compile and the error message from the compiler is that CDocument is an abstract class. I check the documentation and CDocument is an abstract class. However, I do not understand why this is a problem? Also, is it not normal when writing an SDI application to have a message map for the class derived from CDocument to handle Menus?
Thanks
Bob
|
|
|
|
|
The problem here is that my typing is poor and my proof reading is less than ideal. The above code
fragment works if you spell BEGIN_MESSAGE_MAP correctly. It does not work if you spell it incorrectly.
Bob
|
|
|
|
|
BobInNJ wrote: works if you spell BEGIN_MESSAGE_MAP correctly. It does not work if you spell it incorrectly
Good to know!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mr.Univoter is a humorless guy.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I'm usually doing C# work these days, but today I have to track down what's dragging down a C++ app I work on from time to time.
Anyone got the low-down on a good C++ profiler, free or otherwise?
I've checked out VTune from Intel. It looks really good, but the $699 price tag is a little steeper than I was hoping for.
So, any thoughts?
Cheers,
Drew.
|
|
|
|
|
Visual Studio 6 has one.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
I only have VS2008 Pro. My understanding was the the profiler only comes with Team System. Perhaps I'm wrong?
Cheers,
Drew.
|
|
|
|
|
Drew Stainton wrote: Perhaps I'm wrong?
It doesn't look like it.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
I've gone with Very Sleepy[^] for today. Not great, but free and does what I need right now. I'll look for something more permanent later.
Cheers,
Drew.
|
|
|
|
|
I haven't tried it yet, but AQTime looks good. (I'm going to download the demo next week--don't feel like starting something new on Friday afternoon.)
http://www.automatedqa.com/products/aqtime/[^]
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Thanks Joe. I hadn't come across that one yet. I'll take a look. Looks more comprehensive than the others as it'll do .Net stuff as well.
Cheers,
Drew.
|
|
|
|
|
I used it before and it helped us a lot to track memory leaks and finding bottlenecks in our code. And it is also quite easy to work with it.
|
|
|
|