Strings
What are ... ?
Strings are objects that let you store alphanumeric strings like names, addresses and
text in general.
Why do we ... ?
We need strings to represent non-numeric data.
How do we?
Use the class string
- Microsoft Visual C++ 5 and above:
- #include <string>
- use namespace std;
- Older versions of Borland:
- #include "francastring.h"
- Borland version 5
In any event, please use:
#include "franca2001.h" instead of
"franca.h"
Declare String objects
string name,address;
What can we do?
Other operations:
- Find length of string, locate a substring inside the string, etc.
- Those operations are NOT available with francastring.h.