|
Probot wrote: I've found the following CodeProject: http://www.codeproject.com/KB/IP/NetCnfgVersion2.aspx[^]
But I'm not an expert in C++/Cli so I don't know, how to convert this code into a VC++ code so i need your help.
The article is not a C++/CLI article nor is the project a managed (.NET) or the projects it references. They are all native C++.
led mike
|
|
|
|
|
Oops. My bad english. I meaned, that i'm not an expert in native C++, so I don't know how to convert this native Code to use it in an C++/CLI Project.
Is it possible to convert this Project (or the functions of the Project) into a DLL. I think then it's possible to use this code in a C++/CLI project. Or not?
|
|
|
|
|
Probot wrote: I meaned, that i'm not an expert in native C++
expert? I'm not an expert in native C++ either. I am capable with C++ and one needs to be before attempting to use C++/CLI. If your problem is you are a beginner with C++ then go learn C++ first, then come back to C++/CLI later.
led mike
|
|
|
|
|
Consider the unary operator overload as per the example in the Stephen G. Fraser book, "Pro Visual C++/CLI", p. 114:
.
.
static OpClass^ operator -(const OpClass ^lhs)
{
OpClass^ ret == gcnew OpClass(); // gcnew invoked here.
ret->i = -(lhs->i);
return ret;
}
.
.
Let's say I have previously instantiated OpClass objects, fred and jane as follows:
OpClass^ fred = gcnew OpClass();
fred->i = 15;
OpClass^ jane = gcnew OpClass();
jane->i = 23;
fred = -jane;
^
|
+---- This causes the "ret" to be instantiated
as a clsInt object and a copy ( by default
memberwise copy? ) is assigned to fred^.
Does ret's going out of scope at the close
of the overloaded operator function call
mark ret's space on the managed heap for
garbage collection?
And, if this were just traditional C++
would the ret's going out of scope mark
it for "delete"ion or would I have to
explicitly delete it (in my ancient
Deitel & Deitel he doesn't delete it)?
Thanks, in advance,
Coop
Jeff Cooper
|
|
|
|
|
aa1ww wrote: Does ret's going out of scope at the close
of the overloaded operator function
it doesn't go out of scope, it's returned
aa1ww wrote: return ret;
}
aa1ww wrote: if this were just traditional C++
would the ret's going out of scope mark
it for "delete"ion
Native C++ has no garbage collection so there is no marking of anything for deletion.
led mike
|
|
|
|
|
Ok, bear with me here...
fred is a handle to some resources gcnew'd in the instantiation of an OpClass object in the main program, right?
Then, during the operator overloading function call, more resources were gcnew'd for the instantiation of OpClass (whose handle is ret).
So ret is returned as a handle and fred (also an OpClass handle) is replaced, OK. But there are now two allocations of OpClass objects on the managed heap.
perhaps the CLR notices that the previously allocated resources pointed to by fred before the overloading function call are now "orphaned" (when fred was replaced by ret) and can mark those resources for deletion?
Thanks,
Coop
PS: Right, traditional C++ requires me to do explicit delete's on my allocated resources.
Jeff Cooper
|
|
|
|
|
aa1ww wrote: perhaps the CLR notices that the previously allocated resources pointed to by fred before the overloading function call are now "orphaned" (when fred was replaced by ret) and can mark those resources for deletion?
It better since that is what a Garbage Collection systems primary purpose is.
led mike
|
|
|
|
|
Hi,
Quick question; im a developer currently working on a win32 project in C/C++/ASM that utilizes a lot of debugging theory in order to work. However, at this point, i cannot seem to find a way to list all process memory maps running in a win32 process. I can extract a full list of modules, and mappings, but i cannot find anything that isn't loaded as an executable module (e.g. Stacks, Heaps, other Maps).
What i really need is a way to extract a list of all process memory maps in a similar fashion to how ollydbg displays them, so i can use the list of maps for internal program calculations.
Any help would be appreciated as i've spent hours scouring the web for an answer.
~Jason
|
|
|
|
|
Hi
How can I get GUID of an Interface..
I stucked with this problem...
Please help me
Regards
Simnesh
|
|
|
|
|
Currently I looking for a XML parser that will compile without any error's. I tried and found a lot but nothing complided okay. I'm compiling with borland v3.1 for a dos (16bit) application.
Do you have a suggestion for a particulair package?? It only have to read from XML to c++. My XML looks like this:
<Conditions>
<Condition>
<DirtLevel operator="equal" offset="0">15</DirtLevel>
<Condtion>
<Condtion>
<IsEmptyAtStartInfeed offset="1">True</IsEmptyAtStartInfeed>
<IsEmptyAtStartInfeed offset="2">True</IsEmptyAtStartInfeed>
<IsEmptyAtStartInfeed offset="3">True</IsEmptyAtStartInfeed>
</Condition>
</Conditions>
|
|
|
|
|
Welcome to Code Project
This is the C++/CLI forum and is for asking questions about managed and mixed-mode C++ ONLY.
jossie wrote: looking for a XML parser that will compile without any error's.
jossie wrote: My XML looks like this:
Compiling an XML parser would have nothing to do with your XML. I suggest you need to spend a bit of time thinking about your problem and how to state it correctly so that people might be able to assist you. Post your improved question in the Visual C++ / MFC forum, it is what passes for a general C++ questions forum here on CodeProject. When you go to that forum read the first post in it titled, "how to get an answer to your question".
led mike
|
|
|
|
|
After complete the window application i hope to convert it to become web appication for remote access using web browser. Heard that .net can easily do that but how this exacly can be done? I need to rewrite it as web application or there are some wizard or ways to do that? Thank.
|
|
|
|
|
Am using bloodshed dev. C++ for a compiler/IDE
How do you prototype
InfoC *getNext()
{<br />
<br />
return next;<br />
}
I have tried
InfoC::InfoC *getNext()<br />
{<br />
<br />
return next;<br />
}
InfoC InfoC::*getNext()<br />
{<br />
<br />
return next;<br />
}
and
InfoC *InfoC::getNext()<br />
{<br />
<br />
return next;<br />
} .
In the main class I have.
InfoC *InfoC::getNext();
My memory problems are caused by chemo and it's driving me craze. My dr. told me to try Ginseng and Ginkgo to see if it helps.
|
|
|
|
|
What specific error(s) are you getting from the compiler?
Just guessing from what you've shown, it should be something like this:
class InfoC
{
private:
InfoC *next;
...
public:
InfoC *getNext();
...
};
InfoC *InfoC::getNext()
{
return next;
}
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
This is the C++/CLI forum. You should ask .NET questions here, and C++ question in the Visual C++ forum.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks Mark.
Sorry wrong forum.
I called it InfoC because it is holding my information for each number. ie the values and if it has been used.
Thats it.
|
|
|
|
|
WELL I HOPE ALL USERS ARE IN GOOD SPIRITS...FOR TOMORROW IS A FRIDAY AND RELIEF TO A WEEK.
I'M A FRIENDLY NEWBIE POWERUSER WITH AN OPEN MIND AND WEAK HEART.
I have a project for c++ and I need help for the first time. Source CODE IN C++
the word problem:
the department of motor vehicles administers a written driver's exam consisting of 20 multiple choice questions. an applicant for the drivers license exam answers these questions electronically and the answers are stored in a file named xxxxyyy.dat (where xxxx are the last four digits of the ID number, and the yyy are the first three letters of their last name) in other words, each applicants file will be uniquely named. the file containing the correct answers to questions is named ANSWERS.DAT
write a program that will read the contents of the ANSWERS.DAT file into an array (with the size of 20). program should read the applicants answer file into a second array (also 20) the logic of the program should the 'check' the applicants answer to a question and compare it to the 'correct' answer. the program should keep a tally of the number of questions correctly answerd, and the tally of incorrect answers. Finally the program should cout whether or not the applicant 'passed' or 'failed' the exam. they must answer at least 15 questions correctly to pass. program should indicate "PASS" or "FAIL" along with the number of INCORRECT and CORRECT.
following layout for program centered:
Department of Motor Vehicles
Driver's Exam
answered 99 questions correctly.
answered 99 questions incorrectly.
results for this portion of exam: XXXX
AND THATS ALL ALSO FOR AN EXAMPLE .DAT FILE '1278BOB.DAT' AND MULTIPLE CHOICE a,b,c,d
|
|
|
|
|
Unless you're going to use managed C++, you're in the wrong forum.
Aside from that, what are you asking?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Sorry I'm new in this forum. I'll get it right. I need help with an array that compares character contents in two files and outputs results #correct \ #incorrect with total & pass \ fail grade.
|
|
|
|
|
Cross-poster who wants us to do his homework.
|
|
|
|
|
you are an ugly person who is sick and needs help. must be all the meds.
|
|
|
|
|
Wow--like I really care what you think of me. How about playing by the forum rules and you won't get flamed?
|
|
|
|
|
well I never intended for you to show any concern, I know as well as anyone else who visits your pessimistically crap web page, that 'you' feel like your acomplishing some need for others. In all factuality its people like you that gives others a reason to break an ethical code in computing. Instead of lending a helpful insight, you show true characteristics of an unhappy person. So remove my name from your list.
Sincerely,
John
|
|
|
|
|
Sorry, you just made the top of the list!
|
|
|
|
|
Dear all ,
Will it possible to add the run time created dll to install in GAC.
If yes Pl Explain me.
In My Project i used third party Active x control so i add
that reference into the project. then try to provide the strong key
Strong key is attached then i try to add it in assembly info file
then try to build but it is giving me error
Error creating assembly manifest
|
|
|
|