Re: pass an array throuh a function

From: Francis Glassborow (francis_at_robinton.demon.co.uk)
Date: 05/28/04


Date: Fri, 28 May 2004 10:47:12 +0100

In message <2hnm8sFf44n7U1@uni-berlin.de>, Ben Cottrell
<bench@bench333.screaming.net> writes
>class clock
>{
> int hours;
> int minutes;
> int seconds;
>};
>
>So now, you have a data structure called clock, which has 3 properties
>- hours, minutes & seconds.

It might be better to use the struct keyword for this case or else you
must declare the data as public or provide a detailed set of access
functions.

-- 
Francis Glassborow      ACCU
Author of 'You Can Do It!' see http://www.spellen.org/youcandoit
For project ideas and contributions: http://www.spellen.org/youcandoit/projects


Relevant Pages

  • Re: [C++] Help Parsing an Integer/Character Mix
    ... - What kind of data structure are you using? ... int Number; ... while(InFile>> Buffer) ... possible even an member function. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: large file support
    ... FileHeader::Allocate(BitMap *freeMap, int fileSize) ... describing where on disk to find all of the data in the file. ... // The file header data structure can be stored in memory or on disk. ...
    (comp.lang.cpp)
  • Passing complex structure from C# to C++ and back
    ... to pointer structure, as in "prop **x". ... My question is what data structure, marshaling or code do I have to ... int l; // number of elements ...
    (microsoft.public.dotnet.framework.interop)
  • Re: passing structures among functions
    ... "Header files should only contain declarations." ... It also defines for the data structure at the ... int get_data ...
    (comp.lang.c)
  • Re: Map of vectors how? <Long>
    ... > I realized that I wanted to modify my frequency tables, so far I have been using maps like: ... > A string for the letter combinations and an int for the frequency, but now I want to add three more frequencies: ... > I thought about using a vector within a map but I've no idea how to use such a data structure? ...
    (comp.lang.cpp)