#include#include int main() { AString str1("Hello"); AString str2("World"); AString str3 = str1 + " " + str2; std::cout << str3 << std::endl; return 0; }
#includeIn this example, we take a substring of "Hello World" starting at index 6 for a length of 5. This results in "World" being printed to the console. The AString class library is likely part of a larger package such as the Ace library or the Adacore Gnat Pro compiler.#include int main() { AString str1("Hello World"); std::cout << str1.substr(6, 5) << std::endl; return 0; }