Horje
How to make two dimensional string in c++ Code Example
How to make two dimensional string in c++
// C++ program to demonstrate array of strings using
// 2D character array
#include <bits/stdc++.h>
using namespace std;
 
int main()
{
    // Initialize 2D array
    string colour[4] = { "Blue", "Red", "Orange",
                           "Yellow" };
 
    // Printing Strings stored in 2D array
    for (int i = 0; i < 4; i++)
        std::cout << colour[i] << "\n";
  	
  	cout << colour[0][0] << " " << colour[0][1] << "   :)" ; 
 
    return 0;
}




Cpp

Related
C++ Converting Kelvin to Fahrenheit Code Example C++ Converting Kelvin to Fahrenheit Code Example
qstring insert character Code Example qstring insert character Code Example
how to convert a string to a double c++ Code Example how to convert a string to a double c++ Code Example
how to print numbers with only 2 digits after decimal point in c++ Code Example how to print numbers with only 2 digits after decimal point in c++ Code Example
c++ coding structure Code Example c++ coding structure Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9