<?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 c++ compiler ( Old &amp;amp; New Version ) Friend Function problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiler-old-amp-new-version-friend-function-problem/m-p/3841810#M779655</link>
    <description>I am having Friend function problem in my Code.  I have three files ( One C++ &amp;amp; two header files ) &lt;BR /&gt;&lt;BR /&gt;VIL &amp;gt;ls&lt;BR /&gt;CUc060XmlRequest.h  CXmlConverter.C     CXmlConverter.h&lt;BR /&gt;&lt;BR /&gt;VIL:: &amp;gt;cat CUc060XmlRequest.h&lt;BR /&gt;#include &lt;IOSTREAM.H&gt;&lt;BR /&gt;#include "CXmlConverter.h"&lt;BR /&gt;&lt;BR /&gt;class CUc060XmlRequest&lt;BR /&gt;{&lt;BR /&gt;    friend CXmlConverter::CXmlConverter();&lt;BR /&gt;    friend CXmlConverter::CXmlConverter();&lt;BR /&gt;    public:&lt;BR /&gt;    protected:&lt;BR /&gt;    private:&lt;BR /&gt;        static void initXmlTagNames();&lt;BR /&gt;        static void delXmlTagNames();&lt;BR /&gt;};&lt;BR /&gt;inline void CUc060XmlRequest::initXmlTagNames()&lt;BR /&gt;{&lt;BR /&gt;}&lt;BR /&gt;inline void CUc060XmlRequest::delXmlTagNames()&lt;BR /&gt;{&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;VIL: &amp;gt;cat CXmlConverter.C&lt;BR /&gt;#include &lt;IOSTREAM.H&gt;&lt;BR /&gt;#include "CUc060XmlRequest.h"&lt;BR /&gt;#include "CXmlConverter.h"&lt;BR /&gt;&lt;BR /&gt;CXmlConverter::CXmlConverter()&lt;BR /&gt;{&lt;BR /&gt;    CUc060XmlRequest::initXmlTagNames();&lt;BR /&gt;}&lt;BR /&gt;CXmlConverter::~CXmlConverter()&lt;BR /&gt;{&lt;BR /&gt;    CUc060XmlRequest::delXmlTagNames();&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;VIL: &amp;gt;cat CXmlConverter.h&lt;BR /&gt;#include &lt;IOSTREAM.H&gt;&lt;BR /&gt;class CUc060XmlRequest;&lt;BR /&gt;&lt;BR /&gt;class CXmlConverter&lt;BR /&gt;{&lt;BR /&gt;    public:&lt;BR /&gt;        CXmlConverter();&lt;BR /&gt;        virtual ~CXmlConverter();&lt;BR /&gt;    protected:&lt;BR /&gt;    private:&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;VIL: &amp;gt;c++ *.C&lt;BR /&gt;"./CUc060XmlRequest.h", line 6.12:  The attributes "friend" are not allowed.&lt;BR /&gt;"./CXmlConverter.h", line 4.7: CCN5403 (S) "class CXmlConverter" is already defined.&lt;BR /&gt;CCN0793(I) Compilation failed for file ./CXmlConverter.C.  Object file not created.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please help me to resolve the error "the attributes "friend" are not allowed.   I am not able to resolve this. I am upgrading my compiler version from V2R10 to V1R2. It used to work for old compiler.  Semantics for friend declaration have changed for new compiler. &lt;BR /&gt;&lt;/IOSTREAM.H&gt;&lt;/IOSTREAM.H&gt;&lt;/IOSTREAM.H&gt;</description>
    <pubDate>Fri, 11 Aug 2006 06:11:26 GMT</pubDate>
    <dc:creator>Rameshwar Miniyar</dc:creator>
    <dc:date>2006-08-11T06:11:26Z</dc:date>
    <item>
      <title>c++ compiler ( Old &amp; New Version ) Friend Function problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiler-old-amp-new-version-friend-function-problem/m-p/3841810#M779655</link>
      <description>I am having Friend function problem in my Code.  I have three files ( One C++ &amp;amp; two header files ) &lt;BR /&gt;&lt;BR /&gt;VIL &amp;gt;ls&lt;BR /&gt;CUc060XmlRequest.h  CXmlConverter.C     CXmlConverter.h&lt;BR /&gt;&lt;BR /&gt;VIL:: &amp;gt;cat CUc060XmlRequest.h&lt;BR /&gt;#include &lt;IOSTREAM.H&gt;&lt;BR /&gt;#include "CXmlConverter.h"&lt;BR /&gt;&lt;BR /&gt;class CUc060XmlRequest&lt;BR /&gt;{&lt;BR /&gt;    friend CXmlConverter::CXmlConverter();&lt;BR /&gt;    friend CXmlConverter::CXmlConverter();&lt;BR /&gt;    public:&lt;BR /&gt;    protected:&lt;BR /&gt;    private:&lt;BR /&gt;        static void initXmlTagNames();&lt;BR /&gt;        static void delXmlTagNames();&lt;BR /&gt;};&lt;BR /&gt;inline void CUc060XmlRequest::initXmlTagNames()&lt;BR /&gt;{&lt;BR /&gt;}&lt;BR /&gt;inline void CUc060XmlRequest::delXmlTagNames()&lt;BR /&gt;{&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;VIL: &amp;gt;cat CXmlConverter.C&lt;BR /&gt;#include &lt;IOSTREAM.H&gt;&lt;BR /&gt;#include "CUc060XmlRequest.h"&lt;BR /&gt;#include "CXmlConverter.h"&lt;BR /&gt;&lt;BR /&gt;CXmlConverter::CXmlConverter()&lt;BR /&gt;{&lt;BR /&gt;    CUc060XmlRequest::initXmlTagNames();&lt;BR /&gt;}&lt;BR /&gt;CXmlConverter::~CXmlConverter()&lt;BR /&gt;{&lt;BR /&gt;    CUc060XmlRequest::delXmlTagNames();&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;VIL: &amp;gt;cat CXmlConverter.h&lt;BR /&gt;#include &lt;IOSTREAM.H&gt;&lt;BR /&gt;class CUc060XmlRequest;&lt;BR /&gt;&lt;BR /&gt;class CXmlConverter&lt;BR /&gt;{&lt;BR /&gt;    public:&lt;BR /&gt;        CXmlConverter();&lt;BR /&gt;        virtual ~CXmlConverter();&lt;BR /&gt;    protected:&lt;BR /&gt;    private:&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;VIL: &amp;gt;c++ *.C&lt;BR /&gt;"./CUc060XmlRequest.h", line 6.12:  The attributes "friend" are not allowed.&lt;BR /&gt;"./CXmlConverter.h", line 4.7: CCN5403 (S) "class CXmlConverter" is already defined.&lt;BR /&gt;CCN0793(I) Compilation failed for file ./CXmlConverter.C.  Object file not created.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please help me to resolve the error "the attributes "friend" are not allowed.   I am not able to resolve this. I am upgrading my compiler version from V2R10 to V1R2. It used to work for old compiler.  Semantics for friend declaration have changed for new compiler. &lt;BR /&gt;&lt;/IOSTREAM.H&gt;&lt;/IOSTREAM.H&gt;&lt;/IOSTREAM.H&gt;</description>
      <pubDate>Fri, 11 Aug 2006 06:11:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-compiler-old-amp-new-version-friend-function-problem/m-p/3841810#M779655</guid>
      <dc:creator>Rameshwar Miniyar</dc:creator>
      <dc:date>2006-08-11T06:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: c++ compiler ( Old &amp; New Version ) Friend Function problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiler-old-amp-new-version-friend-function-problem/m-p/3841811#M779656</link>
      <description>Hi,&lt;BR /&gt;Would you not require the term class between friend and the class name as CXmlConverter is a class, as you would need void or int or ... if it was a function ?&lt;BR /&gt;&lt;BR /&gt;See have a look at:&lt;BR /&gt;&lt;A href="http://www.codersource.net/cpp_tutorial_friend.html" target="_blank"&gt;http://www.codersource.net/cpp_tutorial_friend.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The second (already defined) error would come from the inclusion of CXmlConverter.h both in CXmlConverter.C and CUc060XmlRequest.h.</description>
      <pubDate>Fri, 11 Aug 2006 06:50:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-compiler-old-amp-new-version-friend-function-problem/m-p/3841811#M779656</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-08-11T06:50:11Z</dc:date>
    </item>
  </channel>
</rss>

