About 1,320,000 results
Open links in new tab
  1. How to input a string array in C++ - Stack Overflow

    Dec 4, 2013 · You should consider using std::vector<string> name;, rather than a fixed-size array, and adding names with push_back(), to avoid the ugly range checks in my code or the …

  2. Array of Strings in C++ - GeeksforGeeks

    Feb 26, 2025 · The general syntax of array of strings is: string arr_name[size] where arr_name is the name assigned to the array and size is the desired size. Understanding how to create and …

  3. Understanding C++ String Array - DigitalOcean

    Aug 4, 2022 · C++ provides us with ‘string’ keyword to declare and manipulate data in a String array. The string keyword allocates memory to the elements of the array at dynamic or run …

  4. C++ User Input Strings - W3Schools

    User Input Strings. It is possible to use the extraction operator >> on cin to store a string entered by a user:

  5. String Array C++: Implementation & Representation With

    Apr 1, 2025 · A string array in C++ is an array of strings. In this tutorial, we will dig into the details of the representation & implementation of string arrays in C++.

  6. How to Take Input in Array in C++? - GeeksforGeeks

    Oct 5, 2023 · But instead of accessing a single element to take input in an array, we use a loop to iterate over the array elements and take input from the user for each element. The following …

  7. c++ - How to input text into array of strings? - Stack Overflow

    Nov 19, 2012 · If you're reading from the standard input: int i = 0; for (string word; cin >> word; i++) names[i] = word; If you're reading from a string, use istringstream instead.

  8. How to input an array of strings in C++? - Blog - Silicon Cloud

    In C++, you can use std::cin to input an array of strings. Here is a simple example code that inputs a string array and prints it out: const int SIZE = 5; std::string arr[SIZE]; // 输入字符串数组 for …

  9. String Array In C++ | Syntax, Methods & More (+Code Examples) …

    In this article, we will explore the concept of string arrays, learning how to declare, initialize, and manipulate them. We will also examine the different ways to create string array in C++, along …

  10. C++. Arrays of strings of type string. Examples - BestProg

    Dec 23, 2019 · This topic provides examples of solving the most common tasks with arrays of strings of type string. 1. Creating an array of strings of type string. Static and dynamic array of …

  11. Some results have been removed
Refresh