|
Thank YOU very MUCH!!!! You saved my life
|
|
|
|
|
Friends,
In this era of .NET we frequntly hear the term Common Language Runtime. The term "runtime" was also heard before but not as frequently used these days.
My question is that What is Runtime? Consider the following C++ code:
#include <iostream>
void main(void)
{
std::cout << "Hello World";
}
The C++ compiler will generate the exe which contains the machine code of the above code. So why we need runtime ?
Imtiaz
|
|
|
|
|
Hi Imitaiz,
That's right. when we have the machine code of the C++ code, we can run it on another machine provided we have the C coompiler for that. But we cannot the code of C in another language and here comes the role of the RunTime
According to my Knowledge, when we talk about runtime then it means we are not talking about the machine code but we are talking about the intermediate code of the program. and this intermediate code is then run by the runtime. Runtime can include other features like in .net we can combine different programs written in different language under one RunTime.
Rits
|
|
|
|
|
Hello!
I'm new here and would like to download code samples from here. But I'm afraid that my computer op could be damaged. How safe are the samples?
Thnx in advance!
|
|
|
|
|
There have been a couple of instances where code has contained a virus (I think it was two articles by the same author). Those pieces of code have been removed, and I don't expect there are any problems any more. If you have any doubt, check the code first. I don't have any concerns with the code I download from here, but I rarely use it without looking at the code first, simply so I know what I expect it to do.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hello,
I'm creating an ActiveX control that consists of various standard MFC controls laid out on a CTabCtrl. I want to enforce a minimum size for the ActiveX control but I can't figure out how to do it. I can force a minimum size for the CTabCtrl, but this of course doesn't restrict the size of the ActiveX object.
Any help would be greatly appreciated.
BTW: If my question demonstrates a fundamental lack of knowledge, be so kind as to point me in the right direction so I may fill the void.
Thanks!
Ian
|
|
|
|
|
hi, i'm looking for sample codes in c/c++ to compute multiplicative inverse in finite field (i'm interested in GF(2^8)) using extended euclidean algorithm. anybody can help me on this? or anybody can give some advice on designing the code?
|
|
|
|
|
How does one create a directory using CreateDirectory() with permissions of the parent directory ?
This is knowing that the parent directory can be access by all users who login to the system (computer).
Thanks in advance
Tony Teveris
|
|
|
|
|
MSDN says for CreateDirectory()
If lpSecurityAttributes is NULL, the directory gets a default security descriptor. The ACLs in the default security descriptor for a directory are inherited from its parent directory.
So if you pass NULL in for the lpSecurityAttributes parameter, does that work? What permissions does the created directory have when you create it, if they aren't those of the parent?
|
|
|
|
|
|
After migrating to the new Visual Studio .NET 2003 IDE from Visual Studio 6, I am having a hard time finding the "set tab order" thing. The documentation claims this is under the view menu, but I can't see it.
Anyone tried to set the tab order for a CFormView in an MFC app in the .NET IDE? Is this just another one of those things that no longer works in the new IDE, that used to work in the previous?
Thanks
|
|
|
|
|
Aaron Schaefer wrote:
Anyone tried to set the tab order for a CFormView in an MFC app in the .NET IDE
Yes... it's NOT under the View menu. Look under the Format menu. Format->Tab Order
Artificial intelligence is no match for natural
stupidity.
|
|
|
|
|
Hello !
When i add "Microsoft FlexGrid control, version 6.0" to my dialog, it open a message box with a error text line below :
The ActiveX control cannot be instantiated.
And:
The ActiveX control "Microsoft FlexGrid control, version 6.0" could not be instantiated because it requires a design time lincese.
What can i do ?
I used Visual C++ 6.0
Please help me.
Thank you.
|
|
|
|
|
|
I used Visual C++ 6.0
Thank you.
|
|
|
|
|
|
I used Visual C++ 6.0 controls in Visual C++ 6.0
Please help me.
Than you.
|
|
|
|
|
|
Did you install the registry keys for the controls?
Artificial intelligence is no match for natural
stupidity.
|
|
|
|
|
Hello,
I have written a C++ program. I have compiled,built and executed the program. It works fine. I want to be able to send the output on the screen to a printer. How can I nclude this option. Can I use MFC? In other words how do I display my program on a page that contains the options for print view, print,save etc.
Thank You
|
|
|
|
|
Have you considered:
FILE *pOutput = fopen("LPT1:", "w");
fprintf(pOutput , ...);
fclose(pOutput);
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
First off I have seen you post this at least 4 times. Yet, everyone who responds seems to be thinking like a rocket scientest. For anyone who reads this, all he wants to do is provide printing options for his program. i.e. File ... Print. It's a simple concept.
From what I've read over the last week or so, he has a console application that does a bunch of stuff and displays it on the screen in the console. All that he wants to do is print what's in the console. So anyone that knows a simple way of printing from the console, post it, so we don't have to continue reading the same post.
Brimid, I told you before, go to the printing section of this site and read some of the articles. I'll even point a few out to you in a few mins. I don't know what to tell you about using MFC, because its not something you can just jump right into and understand. It takes time. But I'll go find a few articles for you to look at anyway.
|
|
|
|
|
|
#include <fstream>
int main(int, char*)
{
ofstream Printer ("lpt1:");
Printer << "Test" << endl;
return 0;
}
Works if the printer is connected to your parallel port, not sure about USB printers.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
Hi all,
I got a really weird problem when I tried to use RemoveAt() function to remove elements from a CArray.
I have two parallel arrays called carrURL (a CString array) and carrHit (an int array). What I want to do is:
If an element in carrURL has duplicated elements, then add its corresponding values from carrHit together and then remove these duplicated elements from carrURL. If an element is unique in the array, just keep it and go next.
For example: suppose carrURL[0], carrURL[4], carrURL [100] are the same string, add the values of carrHit[4], carrHit[100] to carrURL[0] and remove carrURL[4] and carrURL[100] (also remove carrHit[4] and carrHit[100]).
The code is below:
for (int nIndex = 0; nIndex < carrURL.GetSize(); nIndex++){
for (int ncItem = nIndex + 1; ncItem < carrURL.GetSize(); ncItem++){
if (carrURL[ncItem].Compare(carrURL[nIndex]) == 0){
carrHit[nIndex] += carrHit[ncItem];
carrHit.RemoveAt(ncItem);
carrURL.RemoveAt(ncItem);
}
}
carrHit.FreeExtra(); // free extra memory
carrURL.FreeExtra(); // free extra memory
}
However, the result is not what I supposed. It shows something like that:
carrURL carrHit
a 500 -- good
b 333 -- good
c 450 -- weird!
c 61 -- weird!
d 11 -- good
e 10 -- good
c 1 -- weird!
I can't understand why there are still some duplicated values which can not be found out after running a proper loop.
Any suggestions?
Thanks a lot!
|
|
|
|