<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>CodeProject Latest postings for ATL /  WTL / STL</title>
    <link>https://www.codeproject.com</link>
    <description>Latest postings for ATL /  WTL / STL from CodeProject</description>
    <language>en-us</language>
    <image>
      <title>CodeProject Latest postings for ATL /  WTL / STL</title>
      <url>https://www.codeproject.com/App_Themes/Std/Img/logo100x30.gif</url>
      <link>https://www.codeproject.com</link>
      <width>100</width>
      <height>30</height>
      <description>CodeProject</description>
    </image>
    <copyright>Copyright  CodeProject, 1999-2024</copyright>
    <webMaster>Webmaster@codeproject.com (Webmaster)</webMaster>
    <lastBuildDate>Sat, 18 Nov 2023 20:52:00 GMT</lastBuildDate>
    <ttl>20</ttl>
    <generator>C# Hand-coded goodness</generator>
    <item>
      <title>HOW TO ANSWER A QUESTION</title>
      <description>Apologies for the shouting but this is important.&lt;br /&gt;
&lt;br /&gt;
When answering a question please:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Read the question carefully&lt;/li&gt;&lt;li&gt;Understand that English isn't everyone's first language so be lenient of bad spelling and grammar&lt;/li&gt;&lt;li&gt;If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. &lt;b&gt;Insults are not welcome&lt;/b&gt;&lt;/li&gt;&lt;li&gt;If the question is inappropriate then click the 'vote to remove message' button&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid. &lt;br /&gt;
&lt;br /&gt;
&lt;div class="ForumSig"&gt;cheers,&lt;br /&gt;
Chris Maunder&lt;br /&gt;
&lt;br /&gt;
The Code Project Co-founder&lt;br /&gt;
Microsoft C++ MVP&lt;/div&gt;</description>
      <author>Chris Maunder</author>
      <link>https://www.codeproject.com/Messages/3122375/HOW-TO-ANSWER-A-QUESTION</link>
      <pubDate>Thu, 16 Jul 2009 13:09:00 GMT</pubDate>
      <guid>3_3122375</guid>
      <subject>ATL /  WTL / STL</subject>
    </item>
    <item>
      <title>How to get an answer to your question</title>
      <description>For those new to message boards please try to follow a few simple rules when posting your question.&lt;ol&gt;&lt;li&gt;&lt;b&gt;Choose the correct forum for your message&lt;/b&gt;. Posting a VB.NET question in the C++ forum will end in tears.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;&lt;b&gt;Be specific!&lt;/b&gt; Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;Keep the subject line brief, but descriptive. eg "File Serialization problem"&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;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.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;&lt;b&gt;Do not remove or empty a message&lt;/b&gt; 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.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;If you are posting source code with your question, place it inside &amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt; tags. We advise you also check the "Encode "&amp;lt;" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums. &lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;No advertising or soliciting.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;
&lt;div class="signature"&gt;cheers,&lt;br /&gt;
Chris Maunder&lt;br /&gt;
&lt;br /&gt;
The Code Project Co-founder&lt;br /&gt;
&lt;div class="SmallText"&gt;Microsoft C++ MVP&lt;/div&gt;&lt;/div&gt;</description>
      <author>Chris Maunder</author>
      <link>https://www.codeproject.com/Messages/3122363/How-to-get-an-answer-to-your-question</link>
      <pubDate>Thu, 16 Jul 2009 13:05:00 GMT</pubDate>
      <guid>3_3122363</guid>
      <subject>ATL /  WTL / STL</subject>
    </item>
    <item>
      <title>AI</title>
      <description>&lt;div class='pre-lang' id='premain231880'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode231880' class='copy-code' data-index='231880' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre231880' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
how &lt;span class="code-keyword"&gt;do&lt;/span&gt; I &lt;span class="code-keyword"&gt;get&lt;/span&gt; started with AI&lt;/pre&gt;</description>
      <author>Ted Snyders</author>
      <link>https://www.codeproject.com/Messages/5973661/AI</link>
      <pubDate>Sat, 18 Nov 2023 20:52:00 GMT</pubDate>
      <guid>3_5973661</guid>
      <subject>ATL /  WTL / STL</subject>
    </item>
    <item>
      <title>Help with STL list::insert</title>
      <description>Hi &lt;br /&gt;
&lt;br /&gt;
I need a little guidance trying to insert a element my element is a structure here below are my data structures&lt;br /&gt;
&lt;br /&gt;
so I define a structure of type tcbholder struct tcbholder tcbx;&lt;br /&gt;
&lt;br /&gt;
I initialize the iterator member with the following code&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain362505'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode362505' class='copy-code' data-index='362505' style='visibility:hidden'&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 460 460" style="width: 16px;height:16px;" xml:space="preserve"&gt;
&lt;g&gt;
&lt;path d="M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272
    c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729
    c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z"&gt;&lt;/path&gt;
&lt;path d="M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272
    c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068
    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001
    C291.206,428.715,289.92,430,288.341,430z"&gt;&lt;/path&gt;	
&lt;/g&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre362505' style='margin-top:0;' class='lang-cplusplus' data-language='cpp' data-allowShrink='True' data-collapse='False'&gt;
tcbx.straverse = tcbx.strptr.begin(); &lt;span class="code-comment"&gt;// storage discriptor pointer
&lt;/span&gt;	tcbx.stdecsx.blktraverse = tcbx.stdecsx.ablkptr.begin(); &lt;span class="code-comment"&gt;// begin block pointer&lt;/span&gt;&lt;/pre&gt;   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
then to insert a blkdesc type I use the following code&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain954399'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode954399' class='copy-code' data-index='954399' style='visibility:hidden'&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 460 460" style="width: 16px;height:16px;" xml:space="preserve"&gt;
&lt;g&gt;
&lt;path d="M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272
    c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729
    c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z"&gt;&lt;/path&gt;
&lt;path d="M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272
    c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068
    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001
    C291.206,428.715,289.92,430,288.341,430z"&gt;&lt;/path&gt;	
&lt;/g&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre954399' style='margin-top:0;' class='lang-cplusplus' data-language='cpp' data-allowShrink='True' data-collapse='False'&gt;
tcbx.stdecsx.ablkptr.insert(tcbx.stdecsx.blktraverse,tcbx.stdecsx.ablkdescx);&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
I then think I would have to bump up the postion of the iterator so I do the following &lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain534767'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode534767' class='copy-code' data-index='534767' style='visibility:hidden'&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 460 460" style="width: 16px;height:16px;" xml:space="preserve"&gt;
&lt;g&gt;
&lt;path d="M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272
    c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729
    c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z"&gt;&lt;/path&gt;
&lt;path d="M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272
    c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068
    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001
    C291.206,428.715,289.92,430,288.341,430z"&gt;&lt;/path&gt;	
&lt;/g&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre534767' style='margin-top:0;' class='lang-cplusplus' data-language='cpp' data-allowShrink='True' data-collapse='False'&gt;
tcbx.stdecsx.blktraverse++;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
after which I get an exception that I went past the end &lt;br /&gt;
&lt;br /&gt;
Any help would be appreciated&lt;br /&gt;
&lt;br /&gt;
thanks&lt;br /&gt;
&lt;br /&gt;
My first question is am I correct that in initalizing the iterator the code is call list::begin&lt;br /&gt;
&lt;br /&gt;
and then to bump up the interator to get next postion its operator ++&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;div class='pre-lang' id='premain560962'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode560962' class='copy-code' data-index='560962' style='visibility:hidden'&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 460 460" style="width: 16px;height:16px;" xml:space="preserve"&gt;
&lt;g&gt;
&lt;path d="M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272
    c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729
    c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z"&gt;&lt;/path&gt;
&lt;path d="M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272
    c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068
    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001
    C291.206,428.715,289.92,430,288.341,430z"&gt;&lt;/path&gt;	
&lt;/g&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre560962' style='margin-top:0;' class='lang-cplusplus' data-language='cpp' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;struct&lt;/span&gt; blkdesc
   {
       &lt;span class="code-keyword"&gt;char&lt;/span&gt; type;
       &lt;span class="code-keyword"&gt;int&lt;/span&gt; blkaddr;
       &lt;span class="code-keyword"&gt;int&lt;/span&gt; blklen;
       &lt;span class="code-comment"&gt;//  struct blkdesc* nextblkdesc;
&lt;/span&gt;   };
   &lt;span class="code-keyword"&gt;struct&lt;/span&gt; stdecs
   {
       &lt;span class="code-keyword"&gt;struct&lt;/span&gt; vsmdesc stordesc;
       &lt;span class="code-keyword"&gt;char&lt;/span&gt;* tcb;
       &lt;span class="code-keyword"&gt;struct&lt;/span&gt; blkdesc ablkdescx;
       &lt;span class="code-keyword"&gt;struct&lt;/span&gt; blkdesc fblkdescx;
       &lt;span class="code-comment"&gt;//  struct stdecs* nextdecs;
&lt;/span&gt;
       list&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;blkdesc&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt; ablkptr;
       list&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;blkdesc&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;::iterator blktraverse;
       list&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;blkdesc&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt; fblkptr;
   };

   &lt;span class="code-keyword"&gt;struct&lt;/span&gt; tcbholder
   {
       &lt;span class="code-keyword"&gt;char&lt;/span&gt;* tcb;
       &lt;span class="code-keyword"&gt;char&lt;/span&gt; programname[&lt;span class="code-digit"&gt;8&lt;/span&gt;];
       &lt;span class="code-comment"&gt;//  struct stdecs *storageptr;
&lt;/span&gt;       &lt;span class="code-keyword"&gt;struct&lt;/span&gt; stdecs stdecsx;
       list &lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;stdecs&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt; strptr;
       list &lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;stdecs&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;::iterator stfirstptr;
       list &lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;stdecs&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;::iterator straverse;
   };
&lt;/pre&gt;</description>
      <author>ForNow</author>
      <link>https://www.codeproject.com/Messages/5900188/Help-with-STL-list-insert</link>
      <pubDate>Wed, 21 Sep 2022 11:54:00 GMT</pubDate>
      <guid>3_5900188</guid>
      <subject>ATL /  WTL / STL</subject>
    </item>
    <item>
      <title>/std:c++20 broke a template class</title>
      <description>Hi -&lt;br /&gt;
&lt;br /&gt;
I have a template array class based on a std::vector. All worked well w/ c++17, but there is one line I can't seem to port to the new standard. I'm trying to acquire an iterator to the underlying vector.&lt;br /&gt;
&lt;br /&gt;
Any advice is greatly appreciated.&lt;br /&gt;
&lt;br /&gt;
An abbreviated depiction:&lt;br /&gt;
&lt;div class='pre-lang' id='premain530913'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode530913' class='copy-code' data-index='530913' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre530913' style='margin-top:0;' class='lang-cplusplus' data-language='C++' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;template&lt;/span&gt; &lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-keyword"&gt;class&lt;/span&gt; Type&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt; &lt;span class="code-keyword"&gt;class&lt;/span&gt; CMy_Array 
{

    private:
		&lt;span class="code-sdkkeyword"&gt;std::vector&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;Type&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt; m_vItems;

	public:

		CMy_Array()
		{
		}
		&lt;span class="code-keyword"&gt;virtual&lt;/span&gt; ~CMy_Array ()
		{
			m_vItems.clear();
		}
        &lt;span class="code-keyword"&gt;void&lt;/span&gt; InsertAt(&lt;span class="code-keyword"&gt;int&lt;/span&gt; index)
        {

       	&lt;span class="code-comment"&gt;//	THE LINE IN QUESTION - trying to acquire an iterator...
&lt;/span&gt;        &lt;span class="code-comment"&gt;// this worked w/ std:c++17   -
&lt;/span&gt;
            &lt;span class="code-sdkkeyword"&gt;std::vector&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;Type&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;::iterator p =  m_vItems.begin();

        &lt;span class="code-comment"&gt;// With c++20, 2 errors occur; 
&lt;/span&gt;        &lt;span class="code-comment"&gt;// C2760 - syntax error: unexpected token &amp;#39;identifier&amp;#39;, expected &amp;#39;;&amp;#39; , and 
&lt;/span&gt;        &lt;span class="code-comment"&gt;// C7510 - &amp;#39;iterator&amp;#39;: use of dependent type name must be prefixed with &amp;#39;typename&amp;#39;
&lt;/span&gt;
        &lt;span class="code-comment"&gt;// Using the documentation for C2760, I modified the line in question as so -
&lt;/span&gt;
    		&lt;span class="code-sdkkeyword"&gt;std::vector&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;Type&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;::iterator p =  &lt;span class="code-keyword"&gt;static_cast&lt;/span&gt; &lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-sdkkeyword"&gt;std::vector&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;Type&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;::iterator&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt; m_vItems.begin();

        &lt;span class="code-comment"&gt;// This eliminated the C7510 error, but C2760 remains.
&lt;/span&gt;

        }      
}&lt;/pre&gt;</description>
      <author>Member 15671062</author>
      <link>https://www.codeproject.com/Messages/5882116/std-cplusplus20-broke-a-template-class</link>
      <pubDate>Sun, 12 Jun 2022 20:07:00 GMT</pubDate>
      <guid>3_5882116</guid>
      <subject>ATL /  WTL / STL</subject>
    </item>
    <item>
      <title>how to implement CButton as CListbox item</title>
      <description>I see many code projects that enhance the CListBox control, but none that lets each item be another control, like fx CButton. How would one implement that?</description>
      <author>rtischer8277</author>
      <link>https://www.codeproject.com/Messages/5875655/how-to-implement-CButton-as-CListbox-item</link>
      <pubDate>Fri, 06 May 2022 12:51:00 GMT</pubDate>
      <guid>3_5875655</guid>
      <subject>ATL /  WTL / STL</subject>
    </item>
    <item>
      <title>How can I get access to CXXView variables from a Parent Class in MFC</title>
      <description>Hello everybody&lt;br /&gt;
I have an SDI solution in MFC. I have created a class with the name of &lt;b&gt;"CLASS A"&lt;/b&gt;&lt;br /&gt;
 and &lt;br /&gt;
&lt;b&gt;class CXXView : public CView, public CLASS A&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
How can I get access to CXXView variables from CLASS A in MFC?&lt;br /&gt;
&lt;br /&gt;
Indeed; DOSE NOT WORK ==&amp;gt; CXXView * pCurrentView = static_cast&amp;lt;cxxview*&amp;gt;(GetActiveView());&lt;br /&gt;
Because of this error:&lt;br /&gt;
&lt;b&gt;GetActiveView() is undifined&lt;/b&gt; (XXView.h  is included in CLASS A)&lt;br /&gt;
&lt;br /&gt;
Best Regads</description>
      <author>Member 15033704</author>
      <link>https://www.codeproject.com/Messages/5779180/How-can-I-get-access-to-CXXView-variables-from-a-P</link>
      <pubDate>Tue, 19 Jan 2021 18:34:00 GMT</pubDate>
      <guid>3_5779180</guid>
      <subject>ATL /  WTL / STL</subject>
    </item>
    <item>
      <title>code of this question</title>
      <description>codeNation fresher  batch has a tradition of laser tournaments .in laser tag two team play against each other .a team can have any number of players &gt;=1.the two teams can have unequal team member.&lt;br /&gt;
for successful completion of this tournament ipshita want that every person must have played every other person as part of different teams.every laser tag match take 30 minutes to complete .now the gaming arena has allowed codeNation to play for a maxima of X hours after which the arena close . given the number of folks in the batch as  N you will have to find out if codeNation will be able to finish the tournament before the complex closes?</description>
      <author>avadhnaresh kushwaha</author>
      <link>https://www.codeproject.com/Messages/5742896/code-of-this-question</link>
      <pubDate>Wed, 12 Aug 2020 18:17:00 GMT</pubDate>
      <guid>3_5742896</guid>
      <subject>ATL /  WTL / STL</subject>
    </item>
    <item>
      <title>Keypad locks</title>
      <description>For those who enjoy playing with algoritms ... A two-step problem: The simple part, make something that works. The difficult part: Provomg that your solution is the optimal one.&lt;br /&gt;
&lt;br /&gt;
Disclaimer: I have no clue about the second part.&lt;br /&gt;
&lt;br /&gt;
Problem: We have a keypad lock at our work facilities. You present your card, and then if the last four digits typed are a valid entry code, the door opens. So if a valid code is 2345, and you type 1234, the door doesn't open. If you then add a 5, the door opens.&lt;br /&gt;
&lt;br /&gt;
An algoritm for trying all possible keys is like the first homework assignment in 101 Elementary Programming.&lt;br /&gt;
&lt;br /&gt;
If you have no knowledge of any entry code, but you know that if the last four digits are correct, the door will open, what will be your dialing strategy for making the minimal nunber of keys dialled to get in? What will be the &lt;i&gt;worst case&lt;/i&gt; number of digits dialled? Can you prove that this it the theoretically best, that no other algorithm will provide a lower worst case?&lt;br /&gt;
&lt;br /&gt;
What will be the &lt;i&gt;average&lt;/i&gt; across all possible entry codes? Can you &lt;i&gt;prove&lt;/i&gt; that your algorithm provides the minimal number of total keypresses in the average case?&lt;br /&gt;
&lt;br /&gt;
I do not have any ready-made "right answer" to this problem, just a bunch of implementations of how to make sure I get it if I have forgotten the code &lt;img src="https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_smile.gif" align="top" alt="Smile | :)" /&gt;  with no complexity analysis. I do know the code, so I do get in - don't worry about that! The problem here is not to get in, but the complexity of getting in if you do NOT know the code!</description>
      <author>kalberts</author>
      <link>https://www.codeproject.com/Messages/5704163/Keypad-locks</link>
      <pubDate>Sun, 08 Mar 2020 00:23:00 GMT</pubDate>
      <guid>3_5704163</guid>
      <subject>ATL /  WTL / STL</subject>
    </item>
    <item>
      <title>To insert a node at the back of a XOR doubly linked list</title>
      <description>here is the method to insert a node at the front in the XORed doubly linked list or also known as memory efficient doubly linked list : &lt;br /&gt;
&lt;div class='pre-lang' id='premain626601'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode626601' class='copy-code' data-index='626601' style='visibility:hidden'&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 460 460" style="width: 16px;height:16px;" xml:space="preserve"&gt;
&lt;g&gt;
&lt;path d="M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272
    c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729
    c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z"&gt;&lt;/path&gt;
&lt;path d="M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272
    c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068
    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001
    C291.206,428.715,289.92,430,288.341,430z"&gt;&lt;/path&gt;	
&lt;/g&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre626601' style='margin-top:0;' class='lang-cplusplus' data-language='c++' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-comment"&gt;// To write a memory efficient linked list
&lt;/span&gt;&lt;span class="code-keyword"&gt;#include&lt;/span&gt;&lt;span class="code-preprocessor"&gt; &lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;iostream&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;span class="code-keyword"&gt;using&lt;/span&gt; &lt;span class="code-keyword"&gt;namespace&lt;/span&gt; std;

&lt;span class="code-comment"&gt;// Node structure of a memory efficient doubly linked list
&lt;/span&gt;&lt;span class="code-keyword"&gt;class&lt;/span&gt; Node {
public:
    &lt;span class="code-keyword"&gt;int&lt;/span&gt; data;
    Node *npx;      &lt;span class="code-comment"&gt;//  XOR of next and previous node
&lt;/span&gt;};

&lt;span class="code-comment"&gt;// return XORed value of the node address
&lt;/span&gt;Node *XOR(Node *a, Node *b){
    &lt;span class="code-keyword"&gt;return&lt;/span&gt; ((Node *)( (uintptr_t)(a) ^ (uintptr_t)(b) ));
}

&lt;span class="code-comment"&gt;// insert a node at the beggining of the XORed linked list and makes the newly inserted node as head
&lt;/span&gt;&lt;span class="code-keyword"&gt;void&lt;/span&gt; insert(Node **head_ref, &lt;span class="code-keyword"&gt;int&lt;/span&gt; data){
    &lt;span class="code-comment"&gt;// allocate memory for new node
&lt;/span&gt;    Node *new_node = &lt;span class="code-keyword"&gt;new&lt;/span&gt; Node();
    new_node-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;data = data;

    &lt;span class="code-comment"&gt;// since node is inserted at the beggining, npx of the new node will always be XOR of curent head and null
&lt;/span&gt;    new_node-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;npx = XOR((*head_ref), &lt;span class="code-keyword"&gt;nullptr&lt;/span&gt;);

    &lt;span class="code-comment"&gt;// if the linked list is not empty, then npx of current head node will be XOR of new node and node next to current head
&lt;/span&gt;    &lt;span class="code-keyword"&gt;if&lt;/span&gt;(*head_ref != &lt;span class="code-keyword"&gt;nullptr&lt;/span&gt;){
        &lt;span class="code-comment"&gt;// (*head_ref)-&amp;gt;npx is XOR of null and next.
&lt;/span&gt;        &lt;span class="code-comment"&gt;// so if we do XOR of it with null, we get next
&lt;/span&gt;        Node *next = XOR((*head_ref)-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;npx, &lt;span class="code-keyword"&gt;nullptr&lt;/span&gt;);
        (*head_ref)-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;npx = XOR(new_node, next);
    }

    &lt;span class="code-comment"&gt;// change head
&lt;/span&gt;    *head_ref = new_node;
}

&lt;span class="code-comment"&gt;// prints contents of doubly linked list in forward direction
&lt;/span&gt;&lt;span class="code-keyword"&gt;void&lt;/span&gt; printList(Node *head){
    Node *curr = head, *prev = &lt;span class="code-keyword"&gt;nullptr&lt;/span&gt;, *next;

    cout &lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt; &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Following are the nodes of Linked List: \n"&lt;/span&gt;;

    &lt;span class="code-keyword"&gt;while&lt;/span&gt;(curr != &lt;span class="code-keyword"&gt;nullptr&lt;/span&gt;) {
        &lt;span class="code-comment"&gt;// print current node
&lt;/span&gt;        cout &lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt; curr-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;data &lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt; &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt; "&lt;/span&gt;;

        &lt;span class="code-comment"&gt;// get the address of next node : curr-&amp;gt;npa is next^prev,
&lt;/span&gt;        &lt;span class="code-comment"&gt;// so curr-&amp;gt;npx^prev will be next^prev^prev which is next
&lt;/span&gt;        next = XOR(prev, curr-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;npx);

        &lt;span class="code-comment"&gt;// update prev and curr for next iteration
&lt;/span&gt;        prev = curr;
        curr = next;
    }
}

&lt;span class="code-comment"&gt;// Driver function
&lt;/span&gt;&lt;span class="code-keyword"&gt;int&lt;/span&gt; main(){
    Node *head = &lt;span class="code-keyword"&gt;nullptr&lt;/span&gt;;
    insert(&amp;amp;head, &lt;span class="code-digit"&gt;10&lt;/span&gt;);
    insert(&amp;amp;head, &lt;span class="code-digit"&gt;20&lt;/span&gt;);
    insert(&amp;amp;head, &lt;span class="code-digit"&gt;30&lt;/span&gt;);
    insert(&amp;amp;head, &lt;span class="code-digit"&gt;40&lt;/span&gt;);
    insert(&amp;amp;head, &lt;span class="code-digit"&gt;50&lt;/span&gt;);
    insert(&amp;amp;head, &lt;span class="code-digit"&gt;60&lt;/span&gt;);

    printList(head);

    &lt;span class="code-keyword"&gt;return&lt;/span&gt; &lt;span class="code-digit"&gt;0&lt;/span&gt;;
}&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Here is the code i have tried to put an element at the back of the list:&lt;br /&gt;
&lt;div class='pre-lang' id='premain458477'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode458477' class='copy-code' data-index='458477' style='visibility:hidden'&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 460 460" style="width: 16px;height:16px;" xml:space="preserve"&gt;
&lt;g&gt;
&lt;path d="M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272
    c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729
    c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z"&gt;&lt;/path&gt;
&lt;path d="M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272
    c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068
    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001
    C291.206,428.715,289.92,430,288.341,430z"&gt;&lt;/path&gt;	
&lt;/g&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre458477' style='margin-top:0;' class='lang-cplusplus' data-language='c++' data-allowShrink='True' data-collapse='False'&gt;
Node *insert(Node **last, &lt;span class="code-keyword"&gt;int&lt;/span&gt; data){
    &lt;span class="code-comment"&gt;// allocate memory for new node
&lt;/span&gt;    Node *new_node = &lt;span class="code-keyword"&gt;new&lt;/span&gt; Node();
    new_node-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;data = data;

	new_node-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;npx = XOR(*last, &lt;span class="code-keyword"&gt;nullptr&lt;/span&gt;);

	&lt;span class="code-keyword"&gt;if&lt;/span&gt;(*last != &lt;span class="code-keyword"&gt;nullptr&lt;/span&gt;) {
		Node *prev = XOR((*last)-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;npx, &lt;span class="code-keyword"&gt;nullptr&lt;/span&gt;);
		(*last)-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;npx = XOR(prev, new_node);
	}

	&lt;span class="code-comment"&gt;// *last = new_node;
&lt;/span&gt;	&lt;span class="code-keyword"&gt;return&lt;/span&gt; (new_node);
}

&lt;span class="code-comment"&gt;// Driver function
&lt;/span&gt;&lt;span class="code-keyword"&gt;int&lt;/span&gt; main(){
    Node *head = &lt;span class="code-keyword"&gt;nullptr&lt;/span&gt;;
    head = insert(&amp;amp;head, &lt;span class="code-digit"&gt;10&lt;/span&gt;);
    head = insert(&amp;amp;head, &lt;span class="code-digit"&gt;20&lt;/span&gt;);
    head = insert(&amp;amp;head, &lt;span class="code-digit"&gt;30&lt;/span&gt;);
    head = insert(&amp;amp;head, &lt;span class="code-digit"&gt;40&lt;/span&gt;);
    head = insert(&amp;amp;head, &lt;span class="code-digit"&gt;50&lt;/span&gt;);
    head = insert(&amp;amp;head, &lt;span class="code-digit"&gt;60&lt;/span&gt;);

    printList(head);

    &lt;span class="code-keyword"&gt;return&lt;/span&gt; &lt;span class="code-digit"&gt;0&lt;/span&gt;;
}&lt;/pre&gt;&lt;br /&gt;
But it is not working&lt;br /&gt;
output: it is same in both the cases&lt;br /&gt;
&lt;br /&gt;
Thank you</description>
      <author>Tarun Jha</author>
      <link>https://www.codeproject.com/Messages/5670779/To-insert-a-node-at-the-back-of-a-XOR-doubly-linke</link>
      <pubDate>Thu, 17 Oct 2019 19:38:00 GMT</pubDate>
      <guid>3_5670779</guid>
      <subject>ATL /  WTL / STL</subject>
    </item>
    <item>
      <title>Why non-template function does not compile where as template function compiles?</title>
      <description>I am trying to call two identical functions (one is templated and the other one is normal). The templated one compiles successfully, but the non-templated one gives compilation error. Why?&lt;br /&gt;
&lt;div class='pre-lang' id='premain985406'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode985406' class='copy-code' data-index='985406' style='visibility:hidden'&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 460 460" style="width: 16px;height:16px;" xml:space="preserve"&gt;
&lt;g&gt;
&lt;path d="M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272
    c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729
    c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z"&gt;&lt;/path&gt;
&lt;path d="M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272
    c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068
    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001
    C291.206,428.715,289.92,430,288.341,430z"&gt;&lt;/path&gt;	
&lt;/g&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre985406' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
template &amp;lt;typename ParamType&amp;gt;
&lt;span class="code-keyword"&gt;void&lt;/span&gt; Template_universal_ref(ParamType&amp;amp;&amp;amp; param)
{
    cout &amp;lt;&amp;lt; &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Template_universal_ref, param : "&lt;/span&gt; &amp;lt;&amp;lt; param &amp;lt;&amp;lt; endl;
}

&lt;span class="code-keyword"&gt;void&lt;/span&gt; NonTemplate_universal_ref(int&amp;amp;&amp;amp; param)
{
    cout &amp;lt;&amp;lt; &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;NonTemplate_universal_ref, param : "&lt;/span&gt; &amp;lt;&amp;lt; param &amp;lt;&amp;lt; endl;
}

&lt;span class="code-keyword"&gt;int&lt;/span&gt; main()
{
    &lt;span class="code-keyword"&gt;int&lt;/span&gt; x=&lt;span class="code-digit"&gt;5&lt;/span&gt;;
    Template_universal_ref(x);
    &lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;NonTemplate_universal_ref(x); // This is giving compilation error&lt;/span&gt;
    &lt;span class="code-keyword"&gt;return&lt;/span&gt; &lt;span class="code-digit"&gt;0&lt;/span&gt;
}&lt;/pre&gt;In my view &lt;div class='pre-lang' id='premain153175'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode153175' class='copy-code' data-index='153175' style='visibility:hidden'&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 460 460" style="width: 16px;height:16px;" xml:space="preserve"&gt;
&lt;g&gt;
&lt;path d="M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272
    c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729
    c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z"&gt;&lt;/path&gt;
&lt;path d="M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272
    c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068
    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001
    C291.206,428.715,289.92,430,288.341,430z"&gt;&lt;/path&gt;	
&lt;/g&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre153175' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
NonTemplate_universal_ref(x);&lt;/pre&gt; is special version of &lt;div class='pre-lang' id='premain715239'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode715239' class='copy-code' data-index='715239' style='visibility:hidden'&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 460 460" style="width: 16px;height:16px;" xml:space="preserve"&gt;
&lt;g&gt;
&lt;path d="M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272
    c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729
    c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z"&gt;&lt;/path&gt;
&lt;path d="M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272
    c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068
    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001
    C291.206,428.715,289.92,430,288.341,430z"&gt;&lt;/path&gt;	
&lt;/g&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre715239' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
Template_universal_ref(x);&lt;/pre&gt;. Why does NonTemplate_universal_ref(x); result in compilation error?</description>
      <author>PBMBJoshi</author>
      <link>https://www.codeproject.com/Messages/5624539/Why-non-template-function-does-not-compile-where-a</link>
      <pubDate>Fri, 03 May 2019 09:23:00 GMT</pubDate>
      <guid>3_5624539</guid>
      <subject>ATL /  WTL / STL</subject>
    </item>
    <item>
      <title>Advice on interdependent asynchronous functions and task queuing?</title>
      <description>I am working with embedded programming in standard C and there are 2 microcontrollers communicating with each other using a home-made SPI-protocol. In addition, microcontroller 2 has a CAN-bus that should also (indirectly) be fully accessible from microcontroller 1. The scheduler and task queues are also home-made so no realtime operating system is used. My tasks look like this:&lt;br /&gt;
&lt;div class='pre-lang' id='premain344211'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode344211' class='copy-code' data-index='344211' style='visibility:hidden'&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 460 460" style="width: 16px;height:16px;" xml:space="preserve"&gt;
&lt;g&gt;
&lt;path d="M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272
    c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729
    c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z"&gt;&lt;/path&gt;
&lt;path d="M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272
    c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068
    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001
    C291.206,428.715,289.92,430,288.341,430z"&gt;&lt;/path&gt;	
&lt;/g&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre344211' style='margin-top:0;' class='lang-cplusplus' data-language='c++' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;void&lt;/span&gt; (*task_t)(uint8_t* taskData, uint16_t sizeOfTaskDataInBytes);&lt;/pre&gt;My functions to add 1 or 2 tasks look like this:&lt;br /&gt;
&lt;div class='pre-lang' id='premain847872'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode847872' class='copy-code' data-index='847872' style='visibility:hidden'&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 460 460" style="width: 16px;height:16px;" xml:space="preserve"&gt;
&lt;g&gt;
&lt;path d="M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272
    c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729
    c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z"&gt;&lt;/path&gt;
&lt;path d="M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272
    c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068
    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001
    C291.206,428.715,289.92,430,288.341,430z"&gt;&lt;/path&gt;	
&lt;/g&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre847872' style='margin-top:0;' class='lang-cplusplus' data-language='c++' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;typedef&lt;/span&gt; &lt;span class="code-keyword"&gt;enum&lt;/span&gt; {
    TASK_IN_WAIT_PHASE      = &lt;span class="code-digit"&gt;0&lt;/span&gt;,
    TASK_FINISHED           = &lt;span class="code-digit"&gt;1&lt;/span&gt;
} taskStatus_e;

&lt;span class="code-keyword"&gt;typedef&lt;/span&gt; taskStatus_e (*getTaskStatusCallback_t)(uint8_t* data, uint16_t dataSizeBytes);

Bool_t queueTask(taskQueueSelector_e, task_t, uint8_t* data, uint16_t dataSizeBytes, getTaskStatusCallback_t);
Bool_t queue2Tasks(taskQueueSelector_e, task_t task1, uint8_t* data1, uint16_t data1SizeBytes, getTaskStatusCallback_t getTaskStatusCallback1, task_t task2, uint8_t* data2, uint16_t data2SizeBytes, getTaskStatusCallback_t getTaskStatusCallback2);&lt;/pre&gt;When microcontroller 1 wants to read from microcontroller 2 over SPI, the following code is used:&lt;br /&gt;
&lt;div class='pre-lang' id='premain899047'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode899047' class='copy-code' data-index='899047' style='visibility:hidden'&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 460 460" style="width: 16px;height:16px;" xml:space="preserve"&gt;
&lt;g&gt;
&lt;path d="M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272
    c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729
    c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z"&gt;&lt;/path&gt;
&lt;path d="M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272
    c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068
    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001
    C291.206,428.715,289.92,430,288.341,430z"&gt;&lt;/path&gt;	
&lt;/g&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre899047' style='margin-top:0;' class='lang-cplusplus' data-language='c++' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;struct&lt;/span&gt; SPI_secretData_s {
    &lt;span class="code-keyword"&gt;volatile&lt;/span&gt; Bool_t                    accessInProgress;
    &lt;span class="code-keyword"&gt;volatile&lt;/span&gt; int8_t                    numRetriesLeft;
};

&lt;span class="code-preprocessor"&gt;#define PLEASE_SEE_NUM_REGS_TO_ACCESS_PARAMETER     (1)
&lt;/span&gt;
&lt;span class="code-keyword"&gt;struct&lt;/span&gt; SPI_readRegsTaskParams_s {
    &lt;span class="code-keyword"&gt;struct&lt;/span&gt; SPI_secretData_s            secretData;
    &lt;span class="code-keyword"&gt;volatile&lt;/span&gt; uint32_t                  startAddr;
    &lt;span class="code-keyword"&gt;volatile&lt;/span&gt; uint16_t                  numRegsToAccess;
    &lt;span class="code-keyword"&gt;volatile&lt;/span&gt; SPI_readStatus_e          readStatus;
    &lt;span class="code-keyword"&gt;volatile&lt;/span&gt; uint16_t                  readBuffer[PLEASE_SEE_NUM_REGS_TO_ACCESS_PARAMETER];
};

queue2Tasks(SPI_QUEUE_SELECTOR, SPI_readRegs, (uint8_t*)&amp;amp;SPI_readRegsTaskParams, &lt;span class="code-keyword"&gt;sizeof&lt;/span&gt;(SPI_readRegsTaskParams), SPI_getTaskStatusCallback, SPI_handleReadIsFinished, NULL, &lt;span class="code-digit"&gt;0&lt;/span&gt;, NULL);

taskStatus_e SPI_getTaskStatusCallback(uint8_t* data, uint16_t dataSizeBytes) {
    &lt;span class="code-keyword"&gt;struct&lt;/span&gt; SPI_readRegsTaskParams_s* SPI_readRegsTaskParams = (&lt;span class="code-keyword"&gt;struct&lt;/span&gt; SPI_readRegsTaskParams_s*)data;
    &lt;span class="code-keyword"&gt;return&lt;/span&gt; (SPI_readRegsTaskParams-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;secretData.accessInProgress) ? TASK_IN_WAIT_PHASE : TASK_FINISHED;
}

uint32_t SPI_handleReadIsFinished(uint8_t* notUsed, uint16_t sizeOfNotUsedInBytes) {
    &lt;span class="code-keyword"&gt;struct&lt;/span&gt; SPI_readRegsTaskParams_s* SPI_readRegsTaskParams = (&lt;span class="code-keyword"&gt;struct&lt;/span&gt; SPI_readRegsTaskParams_s*)getPreviousTaskData();
    &lt;span class="code-comment"&gt;//... Do what you need to do with the read data...
&lt;/span&gt;}&lt;/pre&gt;When microcontroller 2 wants to read from the CAN-bus, the following code is used:&lt;br /&gt;
&lt;div class='pre-lang' id='premain154183'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode154183' class='copy-code' data-index='154183' style='visibility:hidden'&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 460 460" style="width: 16px;height:16px;" xml:space="preserve"&gt;
&lt;g&gt;
&lt;path d="M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272
    c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729
    c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z"&gt;&lt;/path&gt;
&lt;path d="M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272
    c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068
    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001
    C291.206,428.715,289.92,430,288.341,430z"&gt;&lt;/path&gt;	
&lt;/g&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre154183' style='margin-top:0;' class='lang-cplusplus' data-language='c++' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;struct&lt;/span&gt; CAN_secretData_s {
    &lt;span class="code-keyword"&gt;volatile&lt;/span&gt; Bool_t                         accessInProgress;
};

&lt;span class="code-keyword"&gt;struct&lt;/span&gt; CAN_readRegsTaskParams_s {
             &lt;span class="code-keyword"&gt;struct&lt;/span&gt; CAN_secretData_s        secretData;
    &lt;span class="code-keyword"&gt;volatile&lt;/span&gt; uint32_t                       startAddr;
    &lt;span class="code-keyword"&gt;volatile&lt;/span&gt; uint8_t                        numRegsToReadMax4;
    &lt;span class="code-keyword"&gt;volatile&lt;/span&gt; uint16_t                       readRegsBuffer[&lt;span class="code-digit"&gt;4&lt;/span&gt;];
    &lt;span class="code-keyword"&gt;volatile&lt;/span&gt; CAN_readStatus_e               readStatus;
};

queue2Tasks(CAN_QUEUE_SELECTOR, CAN_readRegs, (uint8_t*)&amp;amp;CAN_readRegsTaskParams, &lt;span class="code-keyword"&gt;sizeof&lt;/span&gt;(CAN_readRegsTaskParams), CAN_getTaskStatusCallback, CAN_handleReadIsFinished, NULL, &lt;span class="code-digit"&gt;0&lt;/span&gt;, NULL);

taskStatus_e CAN_getTaskStatusCallback(uint8_t* data, uint16_t dataSizeBytes) {
    &lt;span class="code-keyword"&gt;struct&lt;/span&gt; CAN_readRegsTaskParams_s* CAN_readRegsTaskParams = (&lt;span class="code-keyword"&gt;struct&lt;/span&gt; CAN_readRegsTaskParams_s*)data;
    &lt;span class="code-keyword"&gt;return&lt;/span&gt; (CAN_readRegsTaskParams-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;secretData.accessInProgress) ? TASK_IN_WAIT_PHASE : TASK_FINISHED;

uint32_t CAN_handleReadIsFinished(uint8_t* notUsed, uint16_t sizeOfNotUsedInBytes) {
    &lt;span class="code-keyword"&gt;struct&lt;/span&gt; CAN_readRegsTaskParams_s* CAN_readRegsTaskParams = (&lt;span class="code-keyword"&gt;struct&lt;/span&gt; CAN_readRegsTaskParams_s*)getPreviousTaskData();
    &lt;span class="code-comment"&gt;//... Do what you need to do with the read data...
&lt;/span&gt;}&lt;/pre&gt;&lt;br /&gt;
Could someone please suggest how I should handle the case when microcontroller 1 wants to read from the CAN-bus, via microcontroller 2?</description>
      <author>arnold_w</author>
      <link>https://www.codeproject.com/Messages/5594061/Advice-on-interdependent-asynchronous-functions-an</link>
      <pubDate>Fri, 08 Feb 2019 10:07:00 GMT</pubDate>
      <guid>3_5594061</guid>
      <subject>ATL /  WTL / STL</subject>
    </item>
    <item>
      <title>Recommended way to deal with queues and pointers to buffers</title>
      <description>I am working with embedded programming in standard C and there are 2 microcontrollers communication with each other using a home-made protocol. The scheduler and task queues are also home-made so no realtime operating system is used. My tasks look like this:&lt;br /&gt;
&lt;div class='pre-lang' id='premain180591'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode180591' class='copy-code' data-index='180591' style='visibility:hidden'&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 460 460" style="width: 16px;height:16px;" xml:space="preserve"&gt;
&lt;g&gt;
&lt;path d="M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272
    c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729
    c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z"&gt;&lt;/path&gt;
&lt;path d="M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272
    c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068
    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001
    C291.206,428.715,289.92,430,288.341,430z"&gt;&lt;/path&gt;	
&lt;/g&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre180591' style='margin-top:0;' class='lang-cplusplus' data-language='c++' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;void&lt;/span&gt; (*task_t)(uint8_t* taskData, uint16_t sizeOfTaskDataInBytes);&lt;/pre&gt;My add-task-to-queue-function looks like this:&lt;br /&gt;
&lt;div class='pre-lang' id='premain249152'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode249152' class='copy-code' data-index='249152' style='visibility:hidden'&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 460 460" style="width: 16px;height:16px;" xml:space="preserve"&gt;
&lt;g&gt;
&lt;path d="M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272
    c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729
    c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z"&gt;&lt;/path&gt;
&lt;path d="M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272
    c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068
    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001
    C291.206,428.715,289.92,430,288.341,430z"&gt;&lt;/path&gt;	
&lt;/g&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre249152' style='margin-top:0;' class='lang-cplusplus' data-language='c++' data-allowShrink='True' data-collapse='False'&gt;
Bool_t addTaskToQueue(queueSelector_e, task_t, uint8_t* taskData, uint16_t sizeOfTaskDataInBytes);&lt;/pre&gt;Please note that the taskData is also inserted into the queue (in an area called task data pool area) so it's not just a pointer to taskData that is being queued. The task data to write data from microcontroller 1 to microcontroller 2 needs to look something like this:&lt;br /&gt;
&lt;div class='pre-lang' id='premain383867'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode383867' class='copy-code' data-index='383867' style='visibility:hidden'&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 460 460" style="width: 16px;height:16px;" xml:space="preserve"&gt;
&lt;g&gt;
&lt;path d="M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272
    c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729
    c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z"&gt;&lt;/path&gt;
&lt;path d="M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272
    c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068
    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001
    C291.206,428.715,289.92,430,288.341,430z"&gt;&lt;/path&gt;	
&lt;/g&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre383867' style='margin-top:0;' class='lang-cplusplus' data-language='c++' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;struct&lt;/span&gt; writeRegTaskData_s {
    uint32_t startAddr;
    uint16_t numRegsToWrite;
    uint8_t dataToWrite[numRegsToWrite]; &lt;span class="code-comment"&gt;// When I want the data to be put inside the queue as well
&lt;/span&gt;&lt;span class="code-keyword"&gt;or&lt;/span&gt;
    uint8_t* dataToWrite &lt;span class="code-comment"&gt;// When I have a big static buffer that I don&amp;#39;t want to put inside the queue
&lt;/span&gt;}&lt;/pre&gt;The problem is with the dataToWrite parameter. Sometimes a lot of data will be written, for example, during a firmware upgrade, and then it's overkill to put all the dataToWrite into the queue, it's perfectly fine to have one static buffer. At other times, for example when reacting to different push button events, I want to put my dataToWrite on the stack and then add it into my task queue. However, when I do this, I must make sure dataToWrite points to the proper location inside my task queue data pool and not on the original buffer on the stack. What's the recommended way to solve this issue in a clean way?</description>
      <author>arnold_w</author>
      <link>https://www.codeproject.com/Messages/5592568/Recommended-way-to-deal-with-queues-and-pointers-t</link>
      <pubDate>Sun, 03 Feb 2019 20:09:00 GMT</pubDate>
      <guid>3_5592568</guid>
      <subject>ATL /  WTL / STL</subject>
    </item>
    <item>
      <title>Can a union in standard C "skip" members?</title>
      <description>The following is an example of a simple struct union:&lt;br /&gt;
&lt;div class='pre-lang' id='premain491235'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode491235' class='copy-code' data-index='491235' style='visibility:hidden'&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 460 460" style="width: 16px;height:16px;" xml:space="preserve"&gt;
&lt;g&gt;
&lt;path d="M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272
    c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729
    c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z"&gt;&lt;/path&gt;
&lt;path d="M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272
    c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068
    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001
    C291.206,428.715,289.92,430,288.341,430z"&gt;&lt;/path&gt;	
&lt;/g&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre491235' style='margin-top:0;' class='lang-cplusplus' data-language='c++' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;typedef&lt;/span&gt; &lt;span class="code-keyword"&gt;union&lt;/span&gt; _UINT32_PART_ {
   uint32_t dwWord;

   &lt;span class="code-keyword"&gt;struct&lt;/span&gt; {
      uint16_t dwMSB;
      uint16_t dwLSB;
   } hw;

   &lt;span class="code-keyword"&gt;struct&lt;/span&gt; {
      uint8_t byMSB;
      uint8_t byMSBL;
      uint8_t byLSBH;
      uint8_t byLSB;
   } b;
} DWORD_PART;&lt;/pre&gt;&lt;br /&gt;
Is is possible to somehow omit, for example dwMSB and byLSBH, without making the subsequent members point to the wrong things? So, basically this is what I want:&lt;br /&gt;
&lt;div class='pre-lang' id='premain976338'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode976338' class='copy-code' data-index='976338' style='visibility:hidden'&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 460 460" style="width: 16px;height:16px;" xml:space="preserve"&gt;
&lt;g&gt;
&lt;path d="M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272
    c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729
    c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z"&gt;&lt;/path&gt;
&lt;path d="M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272
    c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068
    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001
    C291.206,428.715,289.92,430,288.341,430z"&gt;&lt;/path&gt;	
&lt;/g&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre976338' style='margin-top:0;' class='lang-cplusplus' data-language='c++' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;typedef&lt;/span&gt; &lt;span class="code-keyword"&gt;union&lt;/span&gt; _UINT32_PART_ {
   uint32_t dwWord;

   &lt;span class="code-keyword"&gt;struct&lt;/span&gt; {
                         &lt;span class="code-comment"&gt;// 2 bytes empty gap
&lt;/span&gt;      uint16_t dwLSB;    &lt;span class="code-comment"&gt;// This must still point to the 2nd word, not the 1st!
&lt;/span&gt;   } hw;

   &lt;span class="code-keyword"&gt;struct&lt;/span&gt; {
      uint8_t byMSB;
      uint8_t byMSBL;
                         &lt;span class="code-comment"&gt;// 1 byte empty gap
&lt;/span&gt;      uint8_t byLSB;     &lt;span class="code-comment"&gt;// This must still point to the 4th byte, not the 3rd!
&lt;/span&gt;   } b;
} DWORD_PART;&lt;/pre&gt;</description>
      <author>arnold_w</author>
      <link>https://www.codeproject.com/Messages/5592042/Can-a-union-in-standard-C-skip-members</link>
      <pubDate>Fri, 01 Feb 2019 09:46:00 GMT</pubDate>
      <guid>3_5592042</guid>
      <subject>ATL /  WTL / STL</subject>
    </item>
    <item>
      <title>Which type of Regex best to learn for programming with C?</title>
      <description>I like C but I feel it's Achilles heel is string processing.  I've started to do a lot of parsing of text databases in arbitrary format without documentation lately and I need to adapt.&lt;br /&gt;
&lt;br /&gt;
What I need to do is define patterns - expected format for the data and to store the values only if the whole string matches that known pattern.  Input validation.&lt;br /&gt;
&lt;br /&gt;
I'd rather not run the rest of my code without verifying the input conforms.&lt;br /&gt;
&lt;br /&gt;
I think regular expressions are the best way to augment my existing skills without learning a new language, but regexes seem kind of varied and mixed breed.&lt;br /&gt;
&lt;br /&gt;
Perl (5?) Seems to have formal standardization of regexes which is supported in many searching and text editing programs.  There's also PCRE which I can compile on windows or download precompiled lib/dll.&lt;br /&gt;
&lt;br /&gt;
Should I learn Perl regexes and use PCRE or am I overlooking things?</description>
      <author>HS_C_Student</author>
      <link>https://www.codeproject.com/Messages/5580883/Which-type-of-Regex-best-to-learn-for-programming</link>
      <pubDate>Mon, 17 Dec 2018 14:43:00 GMT</pubDate>
      <guid>3_5580883</guid>
      <subject>ATL /  WTL / STL</subject>
    </item>
    <item>
      <title>Directory manipulation in C++</title>
      <description>Dear Friends,&lt;br /&gt;
&lt;br /&gt;
I am working on a legacy project where i do not have support for boost libraries or latest C++ version.&lt;br /&gt;
&lt;br /&gt;
I need to identify the path of a file with given extension(*.abc) that is inside couple of folder.&lt;br /&gt;
&lt;br /&gt;
as example i have path like C:\test&lt;br /&gt;
&lt;br /&gt;
but the given file is found in c:\test\Application\SomeohterApplication\hello.abc&lt;br /&gt;
&lt;br /&gt;
can someone help please ?&lt;br /&gt;
&lt;br /&gt;
Thanks in advance.&lt;br /&gt;
&lt;div class="signature"&gt;vikas da&lt;/div&gt;</description>
      <author>tasumisra</author>
      <link>https://www.codeproject.com/Messages/5562854/Directory-manipulation-in-Cplusplus</link>
      <pubDate>Tue, 16 Oct 2018 14:26:00 GMT</pubDate>
      <guid>3_5562854</guid>
      <subject>ATL /  WTL / STL</subject>
    </item>
    <item>
      <title>Microsoft Office Object Library</title>
      <description>Hi,&lt;br /&gt;
I am trying to use Ribbon control in my outlook addin but could not find "&lt;div class='pre-lang' id='premain870052'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode870052' class='copy-code' data-index='870052' style='visibility:hidden'&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 460 460" style="width: 16px;height:16px;" xml:space="preserve"&gt;
&lt;g&gt;
&lt;path d="M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272
    c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729
    c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z"&gt;&lt;/path&gt;
&lt;path d="M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272
    c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068
    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001
    C291.206,428.715,289.92,430,288.341,430z"&gt;&lt;/path&gt;	
&lt;/g&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre870052' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
Microsoft Office xx.x &lt;span class="code-sdkkeyword"&gt;Object&lt;/span&gt; Library &lt;/pre&gt; in available type library.&lt;br /&gt;
&lt;br /&gt;
I am using Microsoft Office 365 ProPlus. Please help.</description>
      <author>JM2251</author>
      <link>https://www.codeproject.com/Messages/5562271/Microsoft-Office-Object-Library</link>
      <pubDate>Sun, 14 Oct 2018 15:31:00 GMT</pubDate>
      <guid>3_5562271</guid>
      <subject>ATL /  WTL / STL</subject>
    </item>
    <item>
      <title>Unable to find atlapp.h file in Visual Studio 2017</title>
      <description>&lt;div class='pre-lang' id='premain228858'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode228858' class='copy-code' data-index='228858' style='visibility:hidden'&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 460 460" style="width: 16px;height:16px;" xml:space="preserve"&gt;
&lt;g&gt;
&lt;path d="M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272
    c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729
    c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z"&gt;&lt;/path&gt;
&lt;path d="M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272
    c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068
    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001
    C291.206,428.715,289.92,430,288.341,430z"&gt;&lt;/path&gt;	
&lt;/g&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre228858' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
Hi,

Freshly installed Windows &lt;span class="code-digit"&gt;10&lt;/span&gt; and VS2017 enterprise and doing migration &lt;span class="code-sdkkeyword"&gt;from&lt;/span&gt; VS2010 to VS2017. Getting fatal error C1083: Cannot open include file: &lt;span class="code-string"&gt;&amp;#39;&lt;/span&gt;&lt;span class="code-string"&gt;atlapp.h: No such file or direectory when i compile one of the project, even i have selected ATL and required options during VC2017 installation.
I would appreciate if anyone can suggest how to resolve this issue.

Thanks &amp;amp; Regards
Krishna Rao&lt;/span&gt;&lt;/pre&gt;</description>
      <author>Krishna Rao Yekkali</author>
      <link>https://www.codeproject.com/Messages/5549906/Unable-to-find-atlapp-h-file-in-Visual-Studio-2017</link>
      <pubDate>Wed, 29 Aug 2018 10:17:00 GMT</pubDate>
      <guid>3_5549906</guid>
      <subject>ATL /  WTL / STL</subject>
    </item>
    <item>
      <title>CEditCtrl in FrameWnd</title>
      <description>Hi
I need to create edit control on frame window.&lt;br /&gt;
please suggest to do so?</description>
      <author>john5632</author>
      <link>https://www.codeproject.com/Messages/5542575/CEditCtrl-in-FrameWnd</link>
      <pubDate>Thu, 02 Aug 2018 08:24:00 GMT</pubDate>
      <guid>3_5542575</guid>
      <subject>ATL /  WTL / STL</subject>
    </item>
    <item>
      <title>MFC VC2015 How to build from command line both settings: Use Shared DLL and Use Static DLL</title>
      <description>&lt;div class='pre-lang' id='premain803968'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode803968' class='copy-code' data-index='803968' style='visibility:hidden'&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 460 460" style="width: 16px;height:16px;" xml:space="preserve"&gt;
&lt;g&gt;
&lt;path d="M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272
    c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729
    c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z"&gt;&lt;/path&gt;
&lt;path d="M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272
    c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068
    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001
    C291.206,428.715,289.92,430,288.341,430z"&gt;&lt;/path&gt;	
&lt;/g&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre803968' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
Hello boys.

I use Visual Studio &lt;span class="code-digit"&gt;2015&lt;/span&gt;.
Projekt setting: Use MFC &lt;span class="code-keyword"&gt;in&lt;/span&gt; a Shared DLL.

For building &lt;span class="code-sdkkeyword"&gt;from&lt;/span&gt; command line &lt;span class="code-keyword"&gt;is&lt;/span&gt; used:
msbuild .\my_project.sln /t:Rebuild /p:Configuration=Release /p:Platform=x64
All &lt;span class="code-keyword"&gt;is&lt;/span&gt; working well, build runs OK.

I would like to ask you:
Is there a way how to &lt;span class="code-keyword"&gt;switch&lt;/span&gt; (any parametr &lt;span class="code-keyword"&gt;for&lt;/span&gt; msbuild) between Shared and Static MFC DLL?

&lt;span class="code-keyword"&gt;for&lt;/span&gt; example:
msbuild .\my_project.sln /t:Rebuild /p:Configuration=Release /p:Platform=x64 /p:ANYKEYWORD=Shared
or
msbuild .\my_project.sln /t:Rebuild /p:Configuration=Release /p:Platform=x64 p:/ANYKEYWORD=Static
or anything like that.

I can not find a way, how to build project &lt;span class="code-sdkkeyword"&gt;from&lt;/span&gt; command line and &lt;span class="code-keyword"&gt;switch&lt;/span&gt; both possibilities: &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Use MFC in a Shared DLL"&lt;/span&gt; and &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Use MFC in a Static DLL"&lt;/span&gt; without opening IDE and switching it there manualy &lt;span class="code-keyword"&gt;in&lt;/span&gt; project setting.

Thank you &lt;span class="code-keyword"&gt;for&lt;/span&gt; advices and help.
Lubomir&lt;/pre&gt;</description>
      <author>Member 10245587</author>
      <link>https://www.codeproject.com/Messages/5537385/MFC-VC2015-How-to-build-from-command-line-both-set</link>
      <pubDate>Sun, 15 Jul 2018 11:37:00 GMT</pubDate>
      <guid>3_5537385</guid>
      <subject>ATL /  WTL / STL</subject>
    </item>
  </channel>
</rss>