what is the syntax of returning a two dimensional to main function?
miniroselit 0
Newbie Poster
Recommended Answers
Jump to Postint** foo() { int i; int** array = malloc(100 * sizeof(int *)); for(i = 0; i < 100; i++) array[i] = malloc(20 * sizeof(int)); // allocate 20 integers return array; } int main() { int ** array = foo(); }
All 4 Replies
Ancient Dragon 5,243
Achieved Level 70 Team Colleague Featured Poster
Luckychap 68
Posting Pro in Training
miniroselit 0
Newbie Poster
Luckychap 68
Posting Pro in Training
jephthah
commented:
2 months dead, and you bring it up for a typo? -2
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.