++ [ originally posted by Martin ] ++
I don't quite understand how they want to you translate Morse to English and vice versa. Any hints? What was in chapter 5?
chapter 5 is about pointers and strings the last section of the chapter is about
Fundamentals of Characters and Strings there are things like this in the chapter:
-Reading strings
Assign input to character array word[ 20 ]
cin >> word
Reads characters until whitespace or EOF
String could exceed array size
cin >> setw( 20 ) >> word;
Reads 19 characters (space reserved for '\0')
-cin.getline
Reads a line of text
Using cin.getline
cin.getline( array, size, delimiter character);
-cin.getline
Copies input into specified array until either
One less than the size is reached
The delimiter character is input
Example
char sentence[ 80 ];
cin.getline( sentence, 80, '\n' );
-String handling library <cstring> provides functions to
Manipulate strings
Compare strings
Search strings
Tokenize strings (separate them into logical pieces)
-char *strcpy( char *s1, const char *s2 );
char *strncpy( char *s1, const char *s2, size_t n );
char *strcat( char *s1, const char *s2 );
char *strncat( char *s1, const char *s2, size_t n );
int strcmp( const char *s1, const char *s2 );
int strncmp( const char *s1, const char *s2, size_t n );
char *strtok( char *s1, const char *s2 );
size_t strlen( const char *s );