+11 votes
448 views
in Science by
Im am only 7 yers old so i need abit of help witrh this. How do i return a pointer to an array from a function in c++. thanks guys



3 Answers

+1 vote
by (1.34m points)

Way-1

Formal parameters as a pointer as follows −

void myFunction(int *param) {
   .
   .
   .
}

Way-2

Formal parameters as a sized array as follows −

void myFunction(int param[10]) {
   .
   .
   .
}

Way-3

Formal parameters as an unsized array as follows −

void myFunction(int param[]) {
   .
   .
   .
}
by (1.34m points)
did this help?
+1 vote
by (415k points)
I'm in 7th grade and I have no idea what you are talking about, and I just don't know if I'm just dumb 'coz I'm doing okay at school
by (1.34m points)
You are not dumb. C ++ is a computer software language that makes up the MS DOS and windows 96, XP, vista, 7, 8.1, and 10 operating systems. Most people just don't know that.
by (415k points)
+1
Oh, thank goodness lol.
by (1.34m points)
:D
+2 votes
by (6.2k points)
Are you makong computer software?



Related questions

+23 votes
27 answers 4.0k views
+5 votes
4 answers 414 views
asked Jul 31, 2020 in Other by Jane
+4 votes
1 answer 234 views
asked Aug 5, 2020 in Other by Jane
+17 votes
22 answers 1.3k views
+7 votes
3 answers 220 views
+15 votes
13 answers 1.2k views
asked May 17, 2016 in Other by Horselover101
+6 votes
2 answers 817 views
asked Aug 25, 2020 in Other by Jane
+11 votes
1 answer 238 views
+6 votes
1 answer 74 views
+7 votes
1 answer 348 views
+8 votes
2 answers 546 views
+13 votes
1 answer 305 views
+10 votes
1 answer 315 views
+6 votes
5 answers 288 views
+2 votes
2 answers 267 views
asked Mar 5, 2021 in Other by EloquentRacer92
+6 votes
9 answers 347 views
asked Feb 23, 2020 in Other by [̲̅$̲̅(100)̲̅$̲̅]
+3 votes
1 answer 180 views
+19 votes
0 answers 211 views
+13 votes
1 answer 359 views
+6 votes
3 answers 123 views
asked Feb 13, 2023 in Other by -Minecraftnerd- (539k points)
+3 votes
0 answers 105 views
+3 votes
1 answer 276 views
asked Aug 3, 2020 in Other by Jane
+2 votes
2 answers 264 views
asked Jul 29, 2020 in Other by Jane
+7 votes
3 answers 73 views
+16 votes
1 answer 337 views

Recent Badges

Notable Question
Asked question received 50 views
- SLaY2231 -
Popular Question
Asked question received 100 views
- HorseLover -
Popular Question
Asked question received 100 views
- kitkat301 -
Nice Question
Question received +2 upvote
- -Minecraftnerd- -
Good Question
Question received +3 upvote
- -Minecraftnerd- -
...