S
S
Sasha2942018-10-13 18:21:30
C++ / C#
Sasha294, 2018-10-13 18:21:30

Passing arrays to a function?

How can I pass a dimensionless array to a function so that it can be changed in the array and not return it return
Example

void inputReport(char LenRaportTXT[]) {
  
}
char* LenRaportTXT = new char;
inputReport(LenRaportTXT);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ananiev, 2018-10-30
@SaNNy32

To pass an array of unknown size as the first function argument, use a pointer to this array, as part of the second - its size.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question