Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.

Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.

Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.

If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode HTML tags when pasting" checkbox before pasting anything inside the PRE block, and make sure "Ignore HTML tags in this message" check box is unchecked.

Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.

Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.

Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.

If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.

No advertising or soliciting.

We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.

Hi every one. I have typical structure (ECU_t) which has members that considered to be pointer to struct.
i make my question in comments. please help me. by the way i have used freescale code warrior as compiler.

Each structure inside is a pointer and needs to be allocated and even worse this is inherently dangerous because
any of those pointers could be NULL if an error occurred and that line will crash.

output->engine->water_temp = NORMAL;

What you are building is a database and as the entries are small there is no advantages to allocation and pointers,
you only do pointers if the data is going to be large. Just place the structure in as is.

Hello ,
I am a new in MFC c++ Programming.I am working in VS2010 ,There are two dialog windows one is main dialog and other is sub dialog window .I am not geeting how to close only sub dialog window without closing the main window.
I have tried Enddialog() and DestroyWindow() but it close the both two windows .

Wouldn't that break the condition to only use a constant amount of extra space (assuming this refers to memory usage)?

GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

Break the problem into simpler tasks and implement functions for these:

1. write a function that reverses a full list. Make sure to adhere to the constraint to only use a constant amount of space (memory).
2. write a function to find the Nth element within a list from a given starting position (not actually needed, but will simplify the final program)
3. write a function to split off part of a given list before the Nth position
4. write code to retrieve sub-lists of length K using 2. and 3. and code to insert a (modified) sublist back at the original position.
5. use 1. and 4. in an iteration to process the entire list

All of these steps can easily be done with the help of at most two or three temporary references (pointers). The only tricky one is the reverse function.

GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

I am facing an issue while printing some text using Ajantha Font, My observation says that after ANSI code 127 GDIPlus is not printing the correct font on windows 10 x64, where as GDI (Direct printing on DC does it correctly).

To ensure consistent results when creating a font, do not specify OEM_CHARSET or DEFAULT_CHARSET. If you specify a typeface name in the lpszFace parameter, make sure that the fdwCharSet value matches the character set of the typeface specified in lpszFace.

The font mapper does not use the DEFAULT_CHARSET value. An application can use this value to allow the name and size of a font to fully describe the logical font. If a font with the specified name does not exist, a font from any character set can be substituted for the specified font. To avoid unexpected results, applications should use the DEFAULT_CHARSET value sparingly.

Look at the sample code on the page and what setting they use, so what you really want to do for entirely predictable results is specify ANSI_CHARSET and use UNICODE strings, anything else is hit and miss