|
That's a bug in your code or one of the libraries you use.
|
|
|
|
|
sorry, i didn't understand. what kind of bug we are talking about? i didn't understand the reason behind this. can you please tell me why this behavior is happening (i.e running fine in debug mode but in release mode, opens one port and not the other)?
Regards
Jawad
|
|
|
|
|
There are many reasons for a buggy program to behave differently in debug/release mode. For example code optimization can sometimes screw up your code even if its otherwise non-buggy. Fortunately visual C++ is quite safe in this regard so I wouldnt search for something like this. The most dangerous difference between release builds is memory management/allocation. Debug builds use special values to fill up your stack/heap memory areas when they are allocated to detect programming mistakes (like when you try to use uninitialized variables). This fill doesn't happen when you run your program in release mode resulting in different behavior. Another problem is that even if your build is in Release mode the allocated memory is filled with zeros (not the same value as in debug builds) if you start your executable from your ide by debugging it! For this reason sometimes the bug occurs only if you start the exe from outside your IDE and then attach to it with your debugger. I would search for some uninitialized variables/members...
|
|
|
|
|
thak you so much pasztorpisti. that was really helpful
Regards
Jawad
|
|
|
|
|
Delete the .pch file, it's not a source file.
Steve
|
|
|
|
|
If all source files are in a single project then change the .c files to .cpp and try building again.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Legacy source might not compile that way and its constant hassle to upgrade some 3rd parties that come in .c files.
|
|
|
|
|
I know, I have been through similar exercises in the past, but sometimes it just needs to be done.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Hi i need to show the C++ program in a release version could you help me, how to create an executable file for that.
Please let me know if any one could help me. I was trying to make it but few unknow exceptions i couldn’t solve.
my id: ksandeepvarma1@gmail.com
|
|
|
|
|
Hi,
How do I download/copy a file from a remote drive to my local drive. I know the use of API "CopyFile" but what I would like to accomplish is download a big file ~20Mb in packets of 4096bytes. Please help...
Sunil
|
|
|
|
|
Use file I/O, reading and writing one block at a time; see CreateFile() [^] and associated functions.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
i want to make character to hexadecimal conversion dailog based application in mfc....i am new to mfc please help me
send the code to ritu.libra91@gmail.com
ritu
|
|
|
|
|
Please do not ask for complete code. Converting characters to hexadecimal representation can be performed quite easily with either the printf() [^] or cout [^] functions. Neither of which has anything to do with MFC.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Since he left his email address here chances are good we never see this user here. Who has the permissions to edit and remove the email address from the message?
|
|
|
|
|
I think only admins can do that. Strange really, since you and I can edit questions in the Q&A section.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
MS offers free versions of its developer IDE, "VisualStudio" called "Visual Studio Express". It comes with tutorials and Application wizards that help you create a simple dialog based application with just a few mouse clicks.
Note that you can get other free developer suites from different vendors; I suggested VisualStudio because you asked about MFC. Other vendors may not offer much help about MFC.
Also note that you shouldn't invest a lot of time in learning MFC unless you have to. It's antiquated, has some horrible artifacts in its API that should have been fixed 15 years ago, and it's long been replaced with .NET, and now Metro. There are also other libraries with the same functionality as MFC or .NET, some of them free.
|
|
|
|
|
Please help, i don't know how to get coordinates when a user click on an image.
|
|
|
|
|
You get them in the parameters provided with the WM_LBUTTONDOWN [^] message.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
+5, You might be right but the problematic part can easily be the position of the image that is drawn with whatever method...
|
|
|
|
|
Well obviously knowing the co-ordinates of the image is a pre-requisite, but as with so many questions there is a serious lack of detail.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
What kind of image? What kind of coordinates? Without the context its impossible to answer your question, please be a bit more specific!
|
|
|
|
|
All these packets are to be loaded on cars. The cars are lined in order, so that the packet could be loaded on them. The cars are also named [A, B, C, D, E,………….]. Each Car will load the packet with the same alphabet. So, for example, car ‘A’ will load all the packets with name ‘A’. Each particular car will come at the loading point only once. The cars will come at the loading point in alphabetical order. So, car ‘B’ will come and take all the packets with name ‘B’ from the shelf, then car ‘C’ will come. No matter how deep in the shelf any packet ‘B’ is, all of the ‘B’ packets will be displaced before the ‘C’ car arrives. For that purpose, some additional shelves are provided. The packets which are after the packet B, are kept in those shelves. Any one of these shelves contains only packets, having the same name. For example, if any particular shelf is used and if a packet with name X is in it, then only the packets having names X will be kept in it. That shelf will look like [XXXXXXX]. If any shelf is used once, then it could be used again only if it is vacant. Packets from the initial shelf could be unloaded from top only. Write a program that finds the minimum total number of shelves, including the initial one required for this loading process.
|
|
|
|
|
naveen sai wrote: Write a program that ... No, that is what you are supposed to do; this site does not provide on-demand solutions to homework questions.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
can anyone please explain the practical Use of Overlapped structure in I/O operations in serial communication and when,where and why should we use the same?
|
|
|
|
|
Lots of help here[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|