Global Variable or Not

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Macca (asbc31_at_dial.pipex.com)
Date: 09/30/04


Date: Thu, 30 Sep 2004 15:11:32 +0100

Hi,

In my application i have one class,Class A, which as the app is being run
collects diagnostic information throughout the day and stores it in a
vector.

I have another class, Class B, that at the end of the day will take the
contents of this vector, that has been built up over the day, and produces
some excel reports from it.

The problem i am having is how Class B accesses the vector that Class A is
using.

There is no relationship between the 2 classes.
One way would be to declare the vector as a global variable that the two
classes can access.

Im not sure that this is the best way. Does anyone have anyother
suggesstions?

Thanks In Advance
Macca



Relevant Pages

  • Re: Global Variable or Not
    ... Macca wrote: ... > In my application i have one class,Class A, which as the app is being ... > run collects diagnostic information throughout the day and stores it ...
    (microsoft.public.vc.mfc)
  • Re: Global Variable or Not
    ... >In my application i have one class,Class A, which as the app is being run ... >collects diagnostic information throughout the day and stores it in a ... I suggest not allowing A or B to use the pointers to access the vector ...
    (microsoft.public.vc.mfc)
  • Re: Locator app with global mapping?
    ... | Anyone know of a good PHP-based store/dealer locator app that can handle ... supply an address that you feed to google maps. ... get the long/lat of that address. ... stores where the top n stores are nearest the long/lat of the user supplied ...
    (alt.php)
  • Re: Locator app with global mapping?
    ... | Anyone know of a good PHP-based store/dealer locator app that can handle ... supply an address that you feed to google maps. ... get the long/lat of that address. ... stores where the top n stores are nearest the long/lat of the user supplied ...
    (alt.php)
  • Re: Thanks Ubuntu!
    ... "Ubuntu and many distributions before have the most convenient way to ... get Apps ever, far better, easier and earlier than App stores." ...
    (comp.sys.mac.advocacy)