Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Pushing all your questions in a stack.</p> <p>Popping them ...</p> <blockquote> <p>Can anybody help me with this? </p> </blockquote> <p>Let's see.</p> <blockquote> <p>The header file must guarantee that multiple copies of the header file information must not exist in any source code file.</p> </blockquote> <p>Ever heard of a header guard? Or, #pragma? That's two solutions, but you'd have to figure the pros and cons of each.</p> <blockquote> <p>Clearly show the information that goes into the header file array.h and into the source file array.cpp.</p> </blockquote> <p>Are you familiar with programming using C or C++?</p> <blockquote> <p>The class is to maximize the amount of information hiding.</p> </blockquote> <p>Encapsulation. Any standard text on C++/OOD will help you. The idea is to have interfaces and build your code around them.</p> <blockquote> <p>Each element in the array will be a floating point value</p> </blockquote> <p>Sure, why not?</p> <blockquote> <p>Create a class "Array" in C++ that allows a user to specify both forms of arrays. </p> </blockquote> <p>Sure. Do you need to have multi-dimensional arrays as well? All you need to do is translate between these forms. What syntax do you expect your users to use when using your array class? E.g: the popular form is to access array elements using the operator[] as in float_array[ i ] where i = 0, 1, ... N-1.</p> <pre><code>class Array { public: explicit Array(size_t n); // default array, C-style indexing Array(size_t begin, size_t end); // Pascal-style indexing private: float *_a; }; </code></pre> <p>That'll get you started. Let us know if you have more questions.</p>
    singulars
    1. This table or related slice is empty.
    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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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