[Browse] [Tag cloud]

Log on:
Powered by Elgg

Robert McDonald :: Blog

March 23, 2011


The main aim of this project was to demonstrate the use of various programming constructs and techniques by developing a selection of text based utilities. I feel that I have achieved this aim fairly well as I have improved both my knowledge of c++ and the efficiency of the code that I write using new techniques, such as the ability to dynamically allocate memory to an array.


One of the key things I have learnt from the project is the value of dynamic memory allocation, as my whole project is based around the use of queues to store an unpredictable amount of data from the user. The main disadvantage of dynamic memory allocation is its complexity, using a queue is much more complicated that using an array which can be easily accessed through the use of a for loop. More care is needed when using dynamic memory location such as queues with for loops as the size of the queue decreases with every repetition, meaning that a separate variable needs to be used to store the queues original size.


During the course of this project I have also learnt a lot about string manipulation, in particular how to search through a string effectively and add new characters into specific locations in the string. This has caused me some problems, especially when detecting new lines where I have now learnt that ‘\n’ is counted as one character rather than two. I also had some problems working out where to add in words to the string and how to delete previous ones.


I have also learnt a lot about getting a program to work on multiple operating systems, as some libraries and functions can only be used in specific operating systems. This effectively limits the libraries that I could use in the program meaning that I have to be more selective about the libraries I decide to use.


One way I could improve my program would be to add a spell check function. I feel that this function would be a very useful utility as it will allow the user to edit and correct text that they have already typed into the console application, making the word processor a lot more useful


Posted by Robert McDonald | 1 comment(s) | Share

October 18, 2010

a good i dea for a first program would be a very basic program that asks the user their name and then replies with an appropriate response when the name is inputted.

Keywords: SE1SA5

Posted by Robert McDonald | 1 comment(s) | Share

/