You are here:

C++/Need Help with Bidimensioanl arrays

Advertisement


Question
Hi, I was wondering if you could explain how to make bidimensional arrays, with easy steps and what is the structure of a common array program.

Answer
Hi,
  Row = ROW and Column = COL
[1] char ** x = NULL;
    x = (char **) malloc (ROW * sizeof (char *));
    for (int i=0; i < COL; ++i)
     x[i] = (char *) malloc (COL *sizeof (char));
[2] string str;
   vector <string> Arr_of_string;


Hope these two examples could help you.

Thanks,
RaiD

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


Dharmender Rai

Expertise

I can answer general and system level C/C++ questions.

Experience

I have 5 years of experience in C++.

©2016 About.com. All rights reserved.