Note that there are some explanatory texts on larger screens.

plurals
  1. POc++ error c4430 after trying to double multiset object
    primarykey
    data
    text
    <p>In a couple of classes (in vlr namespace) in header files I have a public member of this form:</p> <pre><code>std::multiset&lt;classA,classB::ClassC&gt; data_; </code></pre> <p>in my program it is emptied somewhere and so I want to create a buffer to store its content before it is lost. so under every line of declaration the old member in classes in headers I add such a line:</p> <pre><code>std::multiset&lt;classA,classB::ClassC&gt; data_buff_; </code></pre> <p>and then for buffering I write in some .cpp file:</p> <pre><code>data_buff_.insert(data_); </code></pre> <p>and obtain here <strong>errorC4430: missing type specifier, int assumed.</strong> Can you help me, how should I properly buffer this data, because I was trying with giving namespace in the line I get error, and nothing helped.</p> <p>Many thanks! - - - - - - - - - update - - - - - - - -</p> <p>ClassA.h:</p> <pre><code>namespace vlr { class A{ // some unimportant things } } </code></pre> <p>ClassB.h:</p> <pre><code>namespace vlr { class B{ // some unimportant things public: class C{ // some unimportant things } } } </code></pre> <p>ClassD.h:</p> <pre><code>#include &lt;set&gt; #include "ClassA.h" #include "ClassB.h" namespace vlr { class D { public: std::multiset&lt;classA,classB::ClassC&gt; data_; std::multiset&lt;classA,classB::ClassC&gt; data_buff_; // some other methods and members } } </code></pre> <p>ClassE.h:</p> <pre><code>#include &lt;set&gt; #include "ClassA.h" #include "ClassB.h" namespace vlr { class E { public: std::multiset&lt;classA,classB::ClassC&gt; data_; std::multiset&lt;classA,classB::ClassC&gt; data_buff_; // some other methods and members } } </code></pre> <p>final.cpp:</p> <pre><code>#include &lt;set&gt; #include "ClassA.h" #include "ClassB.h" #include "ClassD.h" #include "ClassE.h" namespace vlr{ // something data_buff_.insert(data_); data_.clear(); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload