+11 votes
436 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 3.8k views
+5 votes
4 answers 396 views
asked Jul 31, 2020 in Other by Jane
+4 votes
1 answer 228 views
asked Aug 5, 2020 in Other by Jane
+17 votes
22 answers 1.3k views
+7 votes
3 answers 216 views
+11 votes
1 answer 231 views
+15 votes
13 answers 1.2k views
asked May 17, 2016 in Other by Horselover101
+6 votes
2 answers 783 views
asked Aug 25, 2020 in Other by Jane
+6 votes
1 answer 68 views
+7 votes
1 answer 340 views
+8 votes
2 answers 506 views
+13 votes
1 answer 298 views
+10 votes
1 answer 308 views

Recent Badges

Popular Question
Asked question received 100 views
- -Minecraftnerd- -
Popular Question
Asked question received 100 views
- ~GrlPWR4Eva~ -
Popular Question
Asked question received 100 views
- cooIjacob -
Notable Question
Asked question received 50 views
- KeigoHeardAnime<3 -
Good Question
Question received +3 upvote
- ~GrlPWR4Eva~ -
...