//My function is but the problem is that i dont have a proper working main function
void reverse(int a[], int n) { // function: Reverses the elements of a. // parameters: // a inout array of values. // n in number of values in a, a[0]..a[n-1] // returns: nothing for (int i=0; i<n/2; i++) { int temp = a; a = a[n-i-1]; a[n-i-1] = temp; } return;
hui
0
Newbie Poster
Recommended Answers
Jump to PostSorry, but you can't really expect that someone will understand your question or function if you post like this.
Retry and please use CODE-tags, indent your code, post the complete code and ask a clear question.
Jump to Postthe problem is that i dont have a proper working main function
I see...but there are more problems. I'm guessing that you want to reverse a string?? Have a look at this , …
All 7 Replies
Nick Evan
4,005
Industrious Poster
Team Colleague
Featured Poster
hui
0
Newbie Poster
Nick Evan
4,005
Industrious Poster
Team Colleague
Featured Poster
may4life
2
Junior Poster in Training
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Nick Evan
4,005
Industrious Poster
Team Colleague
Featured Poster
may4life
2
Junior Poster in Training
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.