Encoding a Series of Messages using the C++ Control Class

Encoding a series of messages is virtually identical in the C++ case as it is with C:

   for ( ; ; ) {
      // logic for populating the data type
      
      stat = employee.Encode();
      if (stat == 0) {
         // encoding was successful
      }
      else {
         // error handling
      }
      
      encodeBuffer.init()      
   }
	 

The major difference in this case is that the init method is called at the end of the loop rather than the C runtime function rtxMemReset. The init method serves the same purpose.