Name: Anonymous 2013-04-30 2:35
Ok guys and gals I have made a random generator which stores the values in list and puts them in a text file but how do I search through list of vectors? basically my data looks like this
[A|b, c, ,c,c,e,]
the first letter is always capital and then lower case I have to look through the list and then keep count and I have shown below what output should be like... I dont need you to code or anything I just need to be pointed in right direction
1. Implement a code that begins with the following user interface:
Please choose from this menu
(G) Generate a new, random data set(user enters size)
(L) Load a specific file
(F) Print to screen Current data set
(S) Save current file
(Q) Quit
The data object consists of two characters and an integer. The first character is capitalized the second lower case, the integer is initialized to 0 and represent the frequency that a particular object has appeared. You are store randomly generated objects in a STL list of STL vectors. The list parameter is the capital letter, and the vector parameter is the lower case, each time that a matching capital/lower case object is generated it is added to the data collection, if it does not already exists it is added to the vector and the frequency is set to 1 otherwise the frequency is incremented and the object discarded.
Sample Data set (option G)
Input size of data set : 15
Ab Cd Ka Zk Al Ab Rb Zm Ab St Ra Vt Am Al Aa
Output to Screen(Option F)
A| b-3, 1-2, m-1, a -1
C|d-1
K|a-1
Z |k-1, m-1
R| b-1, a-1
S| t-1
V| t-1
[A|b, c, ,c,c,e,]
the first letter is always capital and then lower case I have to look through the list and then keep count and I have shown below what output should be like... I dont need you to code or anything I just need to be pointed in right direction
1. Implement a code that begins with the following user interface:
Please choose from this menu
(G) Generate a new, random data set(user enters size)
(L) Load a specific file
(F) Print to screen Current data set
(S) Save current file
(Q) Quit
The data object consists of two characters and an integer. The first character is capitalized the second lower case, the integer is initialized to 0 and represent the frequency that a particular object has appeared. You are store randomly generated objects in a STL list of STL vectors. The list parameter is the capital letter, and the vector parameter is the lower case, each time that a matching capital/lower case object is generated it is added to the data collection, if it does not already exists it is added to the vector and the frequency is set to 1 otherwise the frequency is incremented and the object discarded.
Sample Data set (option G)
Input size of data set : 15
Ab Cd Ka Zk Al Ab Rb Zm Ab St Ra Vt Am Al Aa
Output to Screen(Option F)
A| b-3, 1-2, m-1, a -1
C|d-1
K|a-1
Z |k-1, m-1
R| b-1, a-1
S| t-1
V| t-1