Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Lesson 5 String and the String Class

description
by

Alex Frederick

on 3 February 2010

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Lesson 5 String and the String Class

Lesson 5 Strings and the String Class What is a string? END Hard-co(re)ed values! Intro to Classes and Objects! It is a group of characters put together to create text.
It is one of the most useful kinds of data in a program.
The only way to communicate with the users of your program.
C++ has no string data type.
Character arrays and the string class must be used. Hard-coded values are keyed directly into the source code.
These are also refered to as literals.
A numeric value is called a numeric literal.
A string of text is called a string literal which appears in double quotation marks.
A string character is a character literal which appears in single quotation marks. Object-oriented programming (OPP) is a way of programming that treats parts of a computer program as objects that are similar to real-world objects.
High level programming languages hide the details of code and make it appear simple and easy to use.
OOP allows you or someone else to create a data type. All you have to know is how to use it.
An object is an instance of a class. They are not the same.
HOW DAT WORK? One way of doing this is using oostring.cpp and oostring.h
The dot-h file is a header file that you have to include in your code. One could also use "using namespace std;"
String Operations Containment=the way an object hides the details of how data is stored and how operations work.
A message is a request such as length given to an object to report back on that.
A dot operator is used to send this message.
A method is the code inside the object that performs the message operation.
Then there is also concatenation which you can add onto strings with.
Full transcript