Yurttas/PL/OOL/Cplusplus/F/02/06/00/e 06.cpp

From ZCubes Wiki
Jump to navigation Jump to search
 1/* Copyright(C) 2000
 2   All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
 3
 4   Permission to use, copy, modify, and distribute this
 5   software and its documentation for EDUCATIONAL purposes
 6   and without fee is hereby granted provided that this
 7   copyright notice appears in all copies.
 8
 9   date   : January 1, 2000.
10   author : Salih Yurttas.
11
12   e_06.cpp
13*/
14
15
16#include <iostream>
17
18#include <string>
19
20using namespace std;
21
22const int N = 5;
23
24int main(int argc, char* argv[]) {
25
26  string t("tiger");
27
28  for(int i=0; i<N; i++)
29    cout << "Char at position " << i << " is  " << t.at(i) << endl;
30
31}