<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Whats wrong with this code in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/whats-wrong-with-this-code/m-p/5146004#M683294</link>
    <description>if ( layout != 0 &amp;amp;&amp;amp;&lt;BR /&gt;          !_stat_values.insert(&lt;BR /&gt;          pair&lt;CONST long=""&gt;(&lt;BR /&gt;          static_cast&lt;CONST long=""&gt;((layout * 100) + (file_in.get_data()[2] - '0') ),&lt;BR /&gt;          1L ) ).second )&lt;BR /&gt;        {&lt;BR /&gt;          _stat_values[ ( layout * 100 ) + ( file_in.get_data()[2] - '0' ) ]++;&lt;BR /&gt;        }&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Error that I am getting in aCC 6 is&lt;BR /&gt;"file_line_proc.cpp", line 768: error #2020: identifier "_stat_values" is&lt;BR /&gt;          undefined&lt;BR /&gt;            !_stat_values.insert(&lt;BR /&gt;             ^&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;BTW this code is working aCC 3...&lt;/CONST&gt;&lt;/CONST&gt;</description>
    <pubDate>Thu, 11 Dec 2008 14:57:37 GMT</pubDate>
    <dc:creator>Anwarul Kabir</dc:creator>
    <dc:date>2008-12-11T14:57:37Z</dc:date>
    <item>
      <title>Whats wrong with this code</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/whats-wrong-with-this-code/m-p/5146004#M683294</link>
      <description>if ( layout != 0 &amp;amp;&amp;amp;&lt;BR /&gt;          !_stat_values.insert(&lt;BR /&gt;          pair&lt;CONST long=""&gt;(&lt;BR /&gt;          static_cast&lt;CONST long=""&gt;((layout * 100) + (file_in.get_data()[2] - '0') ),&lt;BR /&gt;          1L ) ).second )&lt;BR /&gt;        {&lt;BR /&gt;          _stat_values[ ( layout * 100 ) + ( file_in.get_data()[2] - '0' ) ]++;&lt;BR /&gt;        }&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Error that I am getting in aCC 6 is&lt;BR /&gt;"file_line_proc.cpp", line 768: error #2020: identifier "_stat_values" is&lt;BR /&gt;          undefined&lt;BR /&gt;            !_stat_values.insert(&lt;BR /&gt;             ^&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;BTW this code is working aCC 3...&lt;/CONST&gt;&lt;/CONST&gt;</description>
      <pubDate>Thu, 11 Dec 2008 14:57:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/whats-wrong-with-this-code/m-p/5146004#M683294</guid>
      <dc:creator>Anwarul Kabir</dc:creator>
      <dc:date>2008-12-11T14:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Whats wrong with this code</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/whats-wrong-with-this-code/m-p/5146005#M683295</link>
      <description>Sorry discard my first post i found the problem. the declartion was commented out in the header file. I don't know how it was compiled or some thing...&lt;BR /&gt;&lt;BR /&gt;Anyway now i got another error&lt;BR /&gt;"/opt/aCC/include_std/memory", line 278: error #2403: invalid redeclaration of&lt;BR /&gt;          member function "std::allocator&amp;lt;_TypeT&amp;gt;::address(_TypeT &amp;amp;) const&lt;BR /&gt;          [with _TypeT=const long]" (declared at line 274)&lt;BR /&gt;      const_pointer address (const_reference __x) const { &lt;BR /&gt;                    ^&lt;BR /&gt;          detected during:&lt;BR /&gt;            instantiation of class&lt;BR /&gt;                      "std::allocator&amp;lt;_TypeT&amp;gt; [with _TypeT=const long]" at&lt;BR /&gt;                      line 88 of "/opt/aCC/include_std/rw/tree"&lt;BR /&gt;            instantiation of class "__rw::__rw_rb_tree_node&amp;lt;_Alloc, _Val,&lt;BR /&gt;                      _Key, _KeyOf&amp;gt; [with&lt;BR /&gt;                      _Alloc=std::allocator&amp;lt;:pair&amp;gt;&amp;gt;,&lt;BR /&gt;                      _Val=std::pair&lt;CONST long=""&gt;, _Key=const long,&lt;BR /&gt;                      _KeyOf=__rw::__select1st&amp;lt;:pair&amp;gt;,&lt;BR /&gt;                      const long&amp;gt;]" at line 282 of&lt;BR /&gt;                      "/opt/aCC/include_std/rw/tree"&lt;BR /&gt;            instantiation of class "__rw::__rb_tree&amp;lt;_Key, _Val, _KeyOf, _Comp,&lt;BR /&gt;                      _Alloc&amp;gt; [with _Key=const long, _Val=std::pair&lt;CONST&gt;&lt;/CONST&gt;                      long, long&amp;gt;, _KeyOf=__rw::__select1st&amp;lt;:pair&amp;gt;&lt;/CONST&gt;                      long, long&amp;gt;, const long&amp;gt;, _Comp=std::less&lt;CONST long=""&gt;,&lt;BR /&gt;                      _Alloc=std::allocator&amp;lt;:pair&amp;gt;&amp;gt;]" at&lt;BR /&gt;                      line 102 of "/opt/aCC/include_std/map"&lt;BR /&gt;            instantiation of class "std::map&amp;lt;_Key, _TypeT, _Compare,&lt;BR /&gt;                      _Allocator&amp;gt; [with _Key=const long, _TypeT=long,&lt;BR /&gt;                      _Compare=std::less&lt;CONST long=""&gt;,&lt;BR /&gt;                      _Allocator=std::allocator&amp;lt;:pair&amp;gt;&amp;gt;]"&lt;BR /&gt;                      at line 69 of&lt;BR /&gt;                      "../../../lib/process_data/inc/file_line_proc.h"&lt;BR /&gt;&lt;BR /&gt;I know the shared files r working as they r used by other application I think...&lt;/CONST&gt;&lt;/CONST&gt;</description>
      <pubDate>Thu, 11 Dec 2008 15:08:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/whats-wrong-with-this-code/m-p/5146005#M683295</guid>
      <dc:creator>Anwarul Kabir</dc:creator>
      <dc:date>2008-12-11T15:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: Whats wrong with this code</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/whats-wrong-with-this-code/m-p/5146006#M683296</link>
      <description>so this is where it must be doing something wrong&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;instantiation of class "std::map&amp;lt;_Key, _TypeT, _Compare,&lt;BR /&gt;                      _Allocator&amp;gt; [with _Key=const long, _TypeT=long,&lt;BR /&gt;                      _Compare=std::less&lt;CONST long=""&gt;,&lt;BR /&gt;                      _Allocator=std::allocator&amp;lt;:pair&amp;gt;&amp;gt;]"&lt;BR /&gt;                      at line 69 of&lt;BR /&gt;                      "../../../lib/process_data/inc/file_line_proc.h"&lt;/CONST&gt;</description>
      <pubDate>Thu, 11 Dec 2008 15:10:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/whats-wrong-with-this-code/m-p/5146006#M683296</guid>
      <dc:creator>Anwarul Kabir</dc:creator>
      <dc:date>2008-12-11T15:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: Whats wrong with this code</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/whats-wrong-with-this-code/m-p/5146007#M683297</link>
      <description>&amp;gt;BTW this code is working aCC3&lt;BR /&gt;&lt;BR /&gt;This old compiler doesn't meet the Standard.  If you are porting to aCC6, you should read the "aC++ standard conformance and compatibility changes":&lt;BR /&gt;&lt;A href="http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=2708d7c682f02110d7c682f02110275d6e10RCRD" target="_blank"&gt;http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=2708d7c682f02110d7c682f02110275d6e10RCRD&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Your problem is: ISO-39. aCC6 detects instantiation conflicts earlier (2403)&lt;BR /&gt;&lt;A href="http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=2708d7c682f02110d7c682f02110275d6e10RCRD#_iso-39._acc6_detects_instantiation_" target="_blank"&gt;http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=2708d7c682f02110d7c682f02110275d6e10RCRD#_iso-39._acc6_detects_instantiation_&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You have several problems:&lt;BR /&gt;_stat_values.insert(pair&lt;CONST long=""&gt;(static_cast&lt;CONST long=""&gt;(layout),1L))&lt;BR /&gt;&lt;BR /&gt;You should never directly use pair or make_pair when you want to use maps.  You should never use "const T" in a cast or function type, since top level CV qualifiers are ignored.&lt;BR /&gt;&lt;BR /&gt;What you should do is:&lt;BR /&gt;typedef std::map&lt;LONG&gt; mapLL;&lt;BR /&gt;mapLL _stat_values;&lt;BR /&gt;_stat_values.insert(mapLL::value_type(layout,1L))&lt;BR /&gt;&lt;BR /&gt;Your real problem is you can't use "const long" as a key in a map:&lt;BR /&gt;error #2403: invalid redeclaration of member function "std::allocator::address() const [with _TypeT=const long]"&lt;BR /&gt;&lt;BR /&gt;&amp;gt;so this is where it must be doing something wrong&lt;BR /&gt;instantiation of class "std::map&amp;lt;_Key, _TypeT&amp;gt; [with _Key=const long, _TypeT=long,&lt;BR /&gt;at line 69 of file_line_proc.h&lt;BR /&gt;&lt;BR /&gt;Right, remove that illegal "const".&lt;/LONG&gt;&lt;/CONST&gt;&lt;/CONST&gt;</description>
      <pubDate>Fri, 12 Dec 2008 03:04:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/whats-wrong-with-this-code/m-p/5146007#M683297</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-12-12T03:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Whats wrong with this code</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/whats-wrong-with-this-code/m-p/5146008#M683298</link>
      <description>yeap it was that constant...</description>
      <pubDate>Fri, 12 Dec 2008 13:16:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/whats-wrong-with-this-code/m-p/5146008#M683298</guid>
      <dc:creator>Anwarul Kabir</dc:creator>
      <dc:date>2008-12-12T13:16:29Z</dc:date>
    </item>
  </channel>
</rss>

