rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You want us to do your homework? Not gonna happen dude! Make an effort to deal with it yourself first, and we will be happy to make suggestions and corrections.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You will likely need to install a Windows VM and compile the code there, or possibly install a Windows compiler on the Mac using Wine and build it with that. Personally, I have a real issue with CS programs that require Windows software for the class. Basically, it is a violation (IMHO) of common sense and scientific reasoning. AFAIC (as far as I'm concerned), unless the class is MS-specific, then it should allow / require the use of open source software.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You either have the modem connected to the wrong port on the router (it needs to be connected to the WAN port), or the cable is the wrong sort (cross-over vs. not cross-over), or the router is fubar.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Too much information. You are probably right in that your computer has become infected with a virus and/or root-kit. It may have infected both the boot sector of the disc, as well as the recovery partition (I have seen both situations on my clients' computers as an IT consultant). 1) erase the ENTIRE drive, including the boot sector. 2) Re-install the operating system from scratch. If you don't have an installation disc, contact the computer manufacturer, purchase one from Microsoft, or switch to a Linux operating system.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are two ways for a computer to connect to a wireless network: 1) dynamic (dhcp) - the router assigns a "temporary" IP address to a specific machine that is connecting to the network, or 2) static, where the computer is configured to use a specific address when connecting to the network. This is often the cause of the types of problems you are expreiencing. You need to verify that your sister's computer is using DHCP addressing instead of static addressing. If not, then go to the computer's TCP/IP settings and change it.

jingda commented: Well said +11
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are a variety of loop constructs. Which to use depends upon a number of factors. In your case, a do {...} while (condition) block would be a reasonable approach. Unfortunately, your control condition statement at the end is bogus. The variable n has not been set, it is a different type than the Answer variable, and you are using an assignment operator instead of a comparison. So change the line

} while ( Answer = n );

to

} while ( Answer == 'n' || Answer == 'N' );

One last issue, is that after you ask the question "Do you want to do it again? (y/n)" you don't take input from the user, so the conditional clause at the end of the loop will not be properly set, at least as per your apparent intent... :-)

skiboy209 commented: Very helpful and not critical +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Assuming your account is configured to use bash as the shell, then you need to edit ~/.bash_logout

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is not a simple subject.

1. As a NetAdmin you will have to maintain firewalls, network sub-nets, internal/external access rules/permissions, and a lot of other stuff.
2. Problems: people always expect that whatever they want, they should be able to do, including sending "sensitive" materials to external users. Dealing with all this cruft is not simple, and requires a lot of political acumen.

Good luck in your endeavors! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Best? Lot's of opinions about that. If you want something that has a chance of running on different operating systems, then use Linux and g++ for c++ and OpenJDK for Java programming. All free, widely used, and robust.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Click on the Properties tab next to the disc selection box. That brings up the properties page. Change the speed from "Max speed" to something a couple of entries slower. Burning at the maximum speed the drive or disc can handle is usually a good way to make a coffee coaster. On my 16x drive I usually burn at 8x or 12x.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, maybe not graduate-level courses, (I am only 14) but it requires reading lots of books.

:-) Well, I for one don't assume that age (or lack thereof) means one cannot understand this stuff. My 16 year old grandson was writing Linux kernel modules at your age, and he is now designing auto-piloting custom-built drone aircraft and helicopters, guided by an embedded system and gps. At 8 he rewired his mom's FM radio so he could use his toy walkietalkie to call her from the back yard! "Hey mom, can you bring me some lemonade?".

FWIW, his aircraft work very well. Mostly he flies them with RC gear, but if they lose contact with the base station, they use the GPS and embedded software to return to base and land without human interaction!

sergent commented: cool +4
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The original post wasn't clear as to whether they were talking about laptops or desktop/server systems. Laptops are generally configured to sleep/hibernate when they are on battery power after some period in order to conserve battery. Workstations can also be configured to hibernate similarly, or on demand, and that does allow you to restart the system in the same context that it was in when hibernated. It does shut down the machine, but saves the context in a hibernation file, and when restarted, reads the hibernation file and restores the system to that context. Sleep is different in that the machine is still powered up enough to keep memory, stack, etc. running enough to save the system context. On a laptop on battery power, the battery will eventually run down, unlike hibernation which actually physically shuts off the system.

jingda commented: Well said +9
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It is best to leave workstations and servers running, unless you are going to leave them just idling for extended periods of time. IE; turn off the workstation when going away for the weekend. Servers should probably not be powered down except for maintenance. In any case, power-up is the most stressful on system components. If you do leave your system on for extended periods of time, monitor component temperature. I left my workstation on when going away one weekend, and when I got back I found that the fan on one of my external disc arrays had failed, cooking the drives and my data as a result... sigh. Since I keep temperature monitoring software running, I would have noticed were I around that the drives were getting "toasty" before they failed, and could have fixed the situation. So the lesson there is - going away for more than a day, then shut down the system unless I need to access it remotely (via VPN).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The device is from Interepoch, and is from about 8 years ago, now "phased out". I doubt you will get Win7 support for it. Here is their web page for it: http://www.interepoch.com.tw/support/iwe100_u.asp

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

the scanner should have a programming interface you can access.
Most likely it stores nothing at all, that's up to you! It just sends you data (when activated) using a specific data format that you then need to interpret in some way to figure out what's there.

Indeed. You need to look at the scanner SDK/API documentation. You might be able to configure it to return an image of the print, that you then need to interpret, or you might be able to configure it to return some sort of checksum that you can compare to a database entry for the user. How you do this is very dependent upon the hardware device. If you need to support multiple devices from different manufacturers, then you need some sort of plugin architecture for you application that can load the appropriate plugin code for each supported device, yet that provides a common interface that your main program can use.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The other site is a SIG (special interest group) that is part of the ACM (Association of Computing Machinery). The ACM is something like the IEEE, but for computer systems specifically. SIGGRAPH specializes in graphics and image processing technologies. My sister-in-law who teaches animation and graphics processing, and is dean of the animation department at a university in Oregon is a member of SIGGRAPH. I used to be a member of the ACM SIGSOFT (software SIG), but now spend most of my time with the IEEE, of which I am an affinity group director and chair.

In any case, if you are serious about a career in these fields, membership in the ACM in general, and SIGGRAPH in particular, should be high on your priority lists. They have a lot of resources to call on, including academic publications that target your specific areas of interest.

salah_saleh commented: this was really helpful +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Mr. Koenig is someone to pay attention to. If you are spending too much time/cycles in memory allocation/initialization, then the usual solution is to cache the memory so it can be reused without reallocating. In truth, memory management is one of the gnarlier problems that complex and long running applications have to resolve. To determine what are the best approaches to take requires an in-depth analysis and understanding of your code, and its trade-offs with regard to system resource utilization.

So, let's say that analysis indicates that your program uses, and frees, 512 byte segments (it can be any size, or combinations of sizes), frequently, yet uses a maximum of 1000 of these at any time (give or take). Then you can build a specialty initiator, allocator, and releaser that your code can use. When the program starts, it automatically allocates and clears 1000 of these 512 byte segments with the initiator. When some code needs a 512 byte segment, it requests it from the allocator which will take a buffer off its free list, add it to the used list, and give it to the requester. When it is done with it, the program calls the releaser which takes it off the used list and adds it back to the free list. If you want, you can clear the buffer in the releaser at that time, but that may not be necessary. FWIW, this also reduces system memory fragmentation and overall utilization that occurs with the normal malloc/free …

Ancient Dragon commented: yes, standard approach to the problem. +17
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

First, profile the application to see where it is taking most of its time. Then, do an in-depth analysis of the code for the problematic sections. There are good tools for detecting memory errors and profiling, most of which seem to be owned by IBM these days. I have had very good results with Purify (memory checking, debugging, and analysis), Quantify (in-depth profiling), and PureCoverage (code coverage tool). These are link-time code-insertion tools developed by Purify, which was subsequently purchased by Rational, and Rational was subsequently purchased by IBM. IMO, for commercial tools, they are the best since you can instrument parts of the code for which you have no source code, such as system or other 3rd party libraries.

In any case, for large-scale systems, we were able to general an overall 60-80% performance improvement, and a very large stability improvement, using these tools.

Tellalca commented: definitive +4
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I had always thought they were the same. But the wiki knows!

Yeah, well, this is one of those subjects that CS boffins can nuke a penthouse party with by interminable arguing. It's all in how one defines certain terms, and frankly, the differences are minimal. IMO, the main difference is that in multi-programming, a process might not relinquish the CPU until it becomes I/O bound or goes into some sort of wait state. In true multi-tasking, a process can be interrupted at any time in order to allow another task to have CPU cycles, usually according to some scheduling algorithm enforced by the system kernel.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok. We will help you with your homework, but only if you make a start on it first. So, propose some answers to these questions, and we can critique them, and perhaps point you in a direction to answer them yourself, or help you consider things that have not occurred to you. Example, your first question - programming constructs that are in one language but not the other:

C++ supports multiple inheritance, java does not.
Java supports interface classes, C++ does not directly (but does with pure virtual base classes).

Until you make some effort to answer these on your own, that is as much as you will get from me.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Linux is a free, and open source operating system, used by millions of people all over the work, including myself and my wife. With that, you can install a virtual machine manager, such as Oracle's VirtualBox (free for personal use), and run ME in a virtual machine, because you can configure the virtual machine (a virtual PC) to look like what ME would expect to run on.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The transport layer deals with errors caused during transmission. The data (application) layer deals with errors caused by application errors, such as data format errors. Two different things, dealt with by the layer responsible for them.

jingda commented: Expert! +8
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Use SSL (https) connections in your browser as much as possible, run a Windows firewall, and turn off sharing on your system when you connect to the network over an unsecured public WiFi access point.

You can use a VPN tunnel (which is encrypted) to your home network, and access the internet using your home router, but that requires configuring your VPN server correctly to do the appropriate routing. I don't use Windows for this (Linux only), so that's about as far as I can take you. I'm sure some googling will help you find information how to do this for Windows systems.

jingda commented: Nice piece of advise rubberdude, well done! +8
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you did that to me, you would quickly become "not a friend"... :-(
It would be better that if you are off-line and someone sends a message, that the system auto-reply that you are not available, and then cache their message for you to reply to when you return. IM tools like Pidgin do that.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The hardest? Probably the code I wrote that enables you to extend properties and behavior of C++ classes at runtime via specifications and rules, not coding. I got a patent for that. The software is used extensively in the semiconductor, flat-panel display, and disc drive manufacturing domains. It allows a manufacturing execution system to be tailored to the requirements of the customer without needing to write code. All the properties, behaviors, and rules are stored in the database, and loaded into memory when the application servers start up. Mostly, these are persistent object properties as well, so it also extended the classes' persistent attributes in the database (Oracle mostly), so when an object was stored, the new properties would be also.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Yes, that would result in a problem. You need to change the hdrContent argument to be a char**, and pass the address that holds the pointer. Then, you probably also need to free the old memory. So, maybe something like this is appropriate:

if (hdrContent == 0)
{
    /* Error - invalid argument */
}
else if (*hdrContent != 0)
{
    free(*hdrContent);
}

*hdrContent = (char*)calloc((strlen(command)+strlen(data)+sizeof(bool))+4, sizeoof(char));
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Your code to clear the contents of the hdrContent variable is wrong, and won't clear the entire allocated space. This is a case where calloc() is a better option than malloc(), as it allocates and clears the memory at the same time. The calloc() function takes two arguments: the first is the number of elements, and the second is the size of each element.

So, your allocation code would be something like this:

hdrContent = (char*)calloc((strlen(command)+strlen(data)+sizeof(bool))+4, sizeof(char));

Also, make sure you have allocated enough space for a terminating null byte.

n1csaf3 commented: This fixed future bugs in my code, thank-you. +1
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

We aren't here to do your homework for you! Please at least make an attempt at it first if you want any help... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The purpose of school work is to learn how to think. To analyze problems, and come up with appropriate solutions. Break the problem up into parts. Identify classes of objects in the system, what their properties should be, and what their behaviors should be. Solve the problem intellectually and symbolically, then you will be ready to start writing software to implement the solution.

Ancient Dragon commented: good suggestions +17
jonsca commented: Here's some of the "new rep" :) +14
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Just remember the KISS principle. Small office == small solutions. Sharepoint? Too complex. A NAS behind your firewall is secure, and provides a very large data store for a very reasonable investment. Don't overthink this.

jlego commented: you are right about sharepoint, that is too complex thank you for pointing that out +3
jingda commented: Right, you are +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Question. Have you installed any other Java versions (JRE, JDK, OpenJDK) on this system since you installed Eclipse? Have you tried reinstalling Eclipse?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, are you connecting to the desktop, or a frame buffer X-server? Also, what is your client? Windows? Linux? And what is the Linux distribution+version+kernel and X-Server you are running on the host? And what VNC version are you running on host and client?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

My advice would be to purchase a small NAS (Network Attached Storage) unit. They connect into the office network and allow you to do exactly what you want, at a very reasonable price. For example, a Buffalo Tech TeraStation NAS with 8TB of data is less than $900 USD on buy.com (free shipping). They have many other options, with less storage (cheaper). I paid more than this, each, for two of their 1TB units about 6-8 years ago, and they are still functioning without problems on my network. One I upgraded to a 2TB capacity this year, and that holds system backups, Linux distributions, and copies of my purchased software. The other I use to store my music files. They are both configured as RAID-5 devices, and work really well in surviving disc failure (the excuse I used to upgrade the one unit - one drive started to fail - no data was lost).

jingda commented: clear and detail. Keep it up +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, you are using a remote client running VNC to connect to your Ubuntu 8.04 system, and are trying to run Eclipse w/ CDT on Ubuntu? One assumes other desktop stuff works ok?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

First, write down the rules to changing the singular case to plural. Express the text as a set of if/then/else statements. For example:

if word ends in a consonant then add 's' to end of word
else if word ends in 'e' then add 's' to end of word
else if word ends in 'y' then remove 'y' and add 'ies' to end of word
.
.
.
etc.

That will clarify in your mind how your code should process the data. Have fun!

Ancient Dragon commented: nice help +36
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As said, the setter functions are intended to modify class member variables in a specific instance of an object of the class. Conversely, getter functions are intended to access the values of those data members. This allows you to specify that the data members are private, keeping outside code from modifying those values without knowing any limitations that the class code may enforce upon the data, such as range checking for numeric values and such. As Narue indicated, allowing others to modify data members of your class directly could easily be a "bad thing".

Typically it works like this:

class Account
{
private:
  double m_LastDepositTime; // Julian date+time value
  double m_LastDepositAmt;  // Amount of last deposit

  Account& operator=(const Account&); // Assignment not allowed
public:
  Account() : m_LastDepoitTime(0.0), m_LastDepositAmt(0.0) {}
  ~Account() {}

// Setter function - this could be called makeDeposit(double,double) for better
// readability of code.
  void setLastDeposit( double dateTime, double amount );


// Getter functions
  double getLastDepositAmt() const { return m_LastDepositAmt; }
  double getLastDepositTime() const { return m_LastDepositTime; }
};
Dexxta27 commented: very helpful +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

These games really exercise the system - CPU, memory, video. A lot of this sort of shutdown/reboot problem occurs because of component overheating. Make sure that your system is effectively dust free, that the fans work properly, and that, as noted by others, your power supply is adequate to drive your system at max. A lot of these big-box store bought systems (even brands like HP/Compaq) have minimalist power supplies that can handle your average system load, but are fubar when it comes to working for a living. Even top-end gear can have this problem. My system is a custom built 8-core, 8GB monster with 750VA power supply. I run Linux, and the temperature monitoring software found that the memory was running so hot, that occasionally the operating system would shut down one of the 4 sticks, and map it out of use (Windows doesn't work quite so gracefully). By moving the memory sticks around I was able to improve air flow over them and reduce their average, and maximum, operating temperature by about 20 degrees. No more memory problems. If I had been running Windows like this, instead of mapping out the overheating RAM, it would have shutdown and/or rebooted the system, most likely...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Multisets are the same as sets, except that they can have multiple instances associated with a single key. They are templates, as you know, but the signature of multiset is not multiset<T>, but multiset<Key_Type, Value_Type, Key_Allocator = Allocator<Key_Type> >. IE, you need at least 2 template arguments when declaring multisets, as in:

multiset<double, double> my_double_mset;
multiset<int, int> my_int_mset;

So, if you wanted a multiset that is keyed on the number of instances of a string, you could do this:

multiset<unsigned, string> counts_of_strings;

Kind of silly examples, but hopefully you get the point.

Doh! I think that was a "senior moment" - thinking of multimap<KT,VT> instead of multiset<T>... My bad - and sorry for the confusion it may have caused.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

RAID just protects from drive failure. Not controller failure, unless you also have redundant controllers! In any case, RAID-1 is just mirroring - no redundancy. You have two drives with the same data. If one failes, the other contains the data. However, some other types of problems can corrupt both drives. RAID-5 is better, since it incorporates striping and distributed parity blocks. IE, in an array of 4 drives, for example, any single drive can fail, and the others can be used to reconstruct it. It is more resilient to other sorts of failures. So, in your case, if you had 4 drives, you would have 2 + 2 drives mirrored. If you want complete mirroring with recovery possible, then I recommend RAID-10, which is mirroring with striping and distributed parity - sort of double redundancy.

Here is the wikipedia article on RAID: http://en.wikipedia.org/wiki/RAID

rch1231 commented: Well written and accurate. +2
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, that would be an unbalanced tree. A more balanced one would look like this:

Int
                Char              Float
            Case    Const   Double     Struct
       Break                                 While

The main thing about AVL tress is that no sub-tree can be more than one level deeper than its sibling. While yours is technically that, it may no exhibit a self-balancing state if you were to insert new elements. Then again, it might. I've written these in commercial code in the deep dark past for database indexing applications, but you haven't included any of your code to analyze for correctness.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

OK, I can see that. I personally prefer using C/C++ terms for programming concepts rather than math terms when talking about programming. Less confusion. But that's just me.

Yeah. I can relate. Even my wife, a particle physicist, calls me an uber geek!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

First, we need to know exactly what error you're getting and where the error occurs. Don't leave it to us to read and understand all 181 lines of code -- pinpoint the problem for us.

And rubberman, argv is not a vector but an array of char* -- but you probably knew that...

Arrays are analogous to the mathematical concepts of the vector, the matrix, and the tensor. Indeed, arrays with one or two indices are often called vectors or matrices, respectively. Arrays are often used to implement tables, especially lookup tables; the word table is sometimes used as a synonym of array.

I meant vector, which is actually what the 'v' part of argv is short for... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

DO NOT ASSIGN VALUES to the vector argv[] (lines 27, 77, etc). Those are set by the system when the program runs. You have probably munged program memory as a result.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sorry, but we don't solve your class problems for you. If you need some help and/or comments with specific parts of your code, that is another thing, and that we might help you with.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

We don't do homework assignments for people. You need to make the effort to write this program. Then, we might be able to make suggestions to help you understand your mistakes and what to do next.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

In your example, you are calling the constructor CircularLinkedList(int), which does not initialize the head pointer. You assume that add() does that, which it should, but that is a bad practice. In any case, there are a number of issues. Whatever you do, make sure that you initialize your member variables in the initialization block, before the body of your class constructors. This will save a LOT of grief. IE, instead of this

Node(int in, char* val,Node* nextNode){
     index = in;
     value = val;
     next = nextNode;
  }
.
.
.
   CircularLinkedList(){
      head = NULL;
   }
   CircularLinkedList(int capacity){
      size = capacity;
      for (int i = 0; i < capacity; i++)
         add(i,NULL); //add new node value of char* NULL      
   }

do this

Node(int in, char* val,Node* nextNode)
  : index(in), value(val), next(nextNode)
  {
  }
.
.
.
   CircularLinkedList() : head(0) {}
   CircularLinkedList(int capacity) : head(0)
   {
      size = capacity;
      for (int i = 0; i < capacity; i++)
         add(i,NULL); //add new node value of char* NULL      
   }

Also, DO NOT USE 'NULL' for generic null pointers in C++. Use the value 0 instead. Why you ask? Because NULL is defined as ((void*)0), and that cast may be a problem in some cases. You are ALWAYS safe to assign 0 to a pointer for a null value. Says so right in the ANSI C++ standard... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Computer forensics is a growing field, and there is always a need for competent analysts in that field of endeavor. If that is your interest, then I would suggest that you consider an MS in computer forensics as well as a BS in computer science. The CS degree is a good start on the forensics stuff, but there is a great deal of depth to the field that cannot be garnered in an ad-hoc manner. It is a real discipline that requires a rigorous approach to generate valid results from your analyses.

As for a final year project, there are a number of things you can do, such as keyword/keyphrase searches, deleted file analysis and non-destructive recovery of deleted data (requires physical access to the drive media, and may require specialized tools), etc. Remember, that in forensics, you need to preserve UNTOUCHED the original media, otherwise you have polluted the water and your analyses may not be admissible in court. So, first you make a bit image copy of the drive being analyzed, then you search that. The recovery of deleted data requires access to the physical media so you can do a sector-by-sector scan to dig out what has been deleted or overwritten. However, you have to document your processes to assure the court that you have made no changes to the media itself (read-only operations). However, the bit-image you made at the beginning should hold a lot of that, so hopefully you won't need to get into …

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The implementation of printStock() and Sales() differ from their declaration at the top of the file. The declaration for printStock() is void printStock(int, int) whereas the implementation is void printStock(int[], int) . Ditto for Sales().

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

itsRadius is a pointer, you need to dereference it before incrementing it.

Precisely. Ie,

/Prefix, increment then fetch
const SimpleC& SimpleC::operator++()
{
	++(*itsRadius);
	return *this;
}
 
//Postfix, creates temp to store original, increment, then fetch 
const SimpleC SimpleC::operator++(int)
{
	SimpleC temp(*this);
	++(*itsRadius);
	return temp;
}

Anyway, good first effort. The mistake is common in new programmer code. One other issue/mistake is the question as to why you are using a pointer-to-int for itsRadius instead of a simple integer (unsigned is probably better)...?