What does it mean ** before the function and what should return

post an example of what you are talking about. It might mean the function returns a 2d array of some sort. It could also mean that its a pointer to a function. Never know until you tell us more.

You are contributing the following post:
I must write a program that includes char ** read (int n) function . The program reads every char pressed on the keyboard and put it in the dynamic array. Also if I press Enter it should be noticed by program because I should give the number n with cin and it is the value of max times I can press enter and maximum rows of characters (completed by ENTER), and then leads all the chars to the console in reverse order. I wrote some code but I don't know how to finish it because it should give all the chars in reverse order.

Could you tell me if you understand me and thanks for answer.

As I understand it n is the number of rows you have to type, the number of characters on each row can be any random value -- the end of a row is when you press the <Enter> key.

char **read(int n)
{
   char** array = new char*[n];

   ...
   return array;
}

To display the chararacters backwards just display them in reverse order -- by that I mean to start at the end of a line and display the charcters one at a time from the back to the front.

Thank you, that you helped me so much. You have understood me properly and your answer is value for me and I solved my problem.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.