1 //===-- main.cpp ------------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 #include <cstdio>
9 #include <iostream>
10 #include <string>
11 #include <map>
12 int main (int argc, char const *argv[])
13 {
14     std::string hello_world ("Hello World!");
15     std::cout << hello_world << std::endl;
16     std::cout << hello_world.length() << std::endl;
17     std::cout << hello_world[11] << std::endl;
18 
19     std::map<std::string, int> associative_array;
20     std::cout << "size of upon construction associative_array: " << associative_array.size() << std::endl;
21     associative_array[hello_world] = 1;
22     associative_array["hello"] = 2;
23     associative_array["world"] = 3;
24 
25     std::cout << "size of associative_array: " << associative_array.size() << std::endl;
26     printf("associative_array[\"hello\"]=%d\n", associative_array["hello"]);
27 
28     printf("before returning....\n"); // Set break point at this line.
29 }
30