|
Not necessarily true:
MFC DLL contains all the MFC code, while linking the static LIB will cause only the required OBJ module to be included in the EXE.
In general the sum of the "small" exe and the DLL exceed the one of the "long" exe.
Then, it depends on how many MFC classes are directly or indirectly used and how many MFC depending exe-s are supposed to be on the target system.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
tejaswini.g wrote: How can I rectify this problem and run the exe file.
Compile in release mode. You cannot redistribute the debug version of the DLLs.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I've small piece of code,My query is , why line in bold not work ?
int main(int argc, char* argv[])
{
char *pp=new char[2];
char c='I';
char *str="test";
strcpy(pp,"dynamic");
pp[0]=c;
cout<<pp<<endl;
str[0]=c;
delete []pp;
return 0;
}
-- modified at 6:56 Tuesday 12th September, 2006
|
|
|
|
|
Because you do not know where the compiler placed the string "test".
What you did with that one was telling the compiler to give you the adress of "test". That means, the compiler has to find a location to place "test" in. And that might, following the C++-Standard, be anywhere, even locations that are not writeable from inside the code.
You should not make any assumptions on where the compiler places this. You need to assign memory to the char*, then copy "test" into the char*, in order for this to work.
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
Ok.Thanks.
I was in assumption that,
char* str="test";
cout<<str[0]<<endl;
is possible , then reverse is also possible.
Thanks.
|
|
|
|
|
Because *str is a pointer to a string constant "test", and not an array of characters.
The pointer *str can be made to point to a different location, but the contents of a string constant cannot be changed (the ANSI C Standard actually says trying to modify the contents of string constant is undefined - ie. sometimes it might work, other times it may not - so you should never be writing code like this)
Writing the following would work because str would be an array of characters. The contents of the array could be changed, but str will always refer to the same storage.
chat str[] = "test";
str[0] = c;
|
|
|
|
|
|
prasad_som wrote: char *str="test";
prasad_som wrote: I've small piece of code,My query is , why line in bold not work ?
Because compiler places these type of strings in read only memory area.
|
|
|
|
|
|
prasad_som wrote: char *pp=new char[2];
...
strcpy(pp,"dynamic");
Slightly off topic ... the above code will corrupt memory. pp is a pointer to a character array that has allocated space for 2 characters. "dynamic" is longer than 2, so copying it into pp will overwrite memory you don't control.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
thanks, for correcting me. I overlooked it, to say my point.
|
|
|
|
|
If is someone who can help me with an example ( a program that works )?
Bravoone
|
|
|
|
|
NO !
reposting will never help you here. and consider reading what i previously answered to you in your last post (here[^])
|
|
|
|
|
Relax toxcct he asks and it seems that we answers not enough,but i dont know why he asks repeated same questions without any try
|
|
|
|
|
WhiteSky wrote: he asks and it seems that we answers not enough
firstly, i don't call this "asking". a regular question provides relevant informations to people totally outside of the problem, ,so that they can understand what happen. this is not the cas here.
secondly, we don't answer enough, obviously, because he doesn't ask correctly. moreover, i am not, and no one here is, paid to help others. everything is a matter of correct social behavior. if you consider the ones who can help you as dumb guy, then f*ck off and find yourself a solution to your problem. otherwise, behave yourself as you do in real life.
WhiteSky wrote: but i dont know why he asks repeated same questions without any try
because idiots don't act like us buddy
|
|
|
|
|
Real life in virtual environment.
|
|
|
|
|
no, i meant, he behaves like this certainly because he hides hisself behind a PC, but would he really have behaved like this if being in front of real people ?
|
|
|
|
|
Dear toxcct I understood your purpose when I saw "real life" I remember this sentence you speak explicit
|
|
|
|
|
I want to help you but you need to ask a specific question
|
|
|
|
|
Hi to all,
I have written an SDI application and it is working
properly but my problem is that the "RC"(resource) file
become long in size. It is approximatly 50 MB.I am not
able to resolve this problem.so please give me the proper
solution
thanks and regards
sunil kumar verma
Sunil kumar verma
Software Engineer
|
|
|
|
|
50mb ??? Thats some resource. You may want to check the items that are being stored, especially the user defined items. Make sure you have not inadvertanly added the pagefile. Open the .rc in a text editor and search for anything that shouldn't be there.
|
|
|
|
|
|
sunil kumar verma wrote: I am not able to resolve this problem.
What problem?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi All,
How to know the size of dialog.
As i using EVC++.
I have try this function but they not give my dialog size.
GetClientRect<br />
GetWindowRect<br /> They just give my a region size on which my dialog is display on screen & my dialog is bigger then screen height.
CalcWindowRect is also not working.
regards,
Divyang Mithaiwala
|
|
|
|
|
Anyone know how to open/view this unknown RLE compression? I think it was a component from C++ based program. here is the file http://www.xezn.com/unknownrle.rle
thanks a lot for any help
|
|
|
|