#include<string>



________________________________
From: Robert Ryan <[email protected]>
To: [email protected]
Sent: Saturday, 27 June, 2009 5:41:18
Subject: [c-prog] array problem





 
#include<iostream>
using namespace std;
 
int main()
{
 
        const int n = 10;
        string arrayMax;
        int num[n] = { 25, 10, 15, 3, 5, 56, 107, 22, 16, 85};
        cout << "Array:  ";
        for(int i=0; i<n; i++)
                cout << " " << num[i];
        cout << "\n";
         // 3.1.2a.cpp:14: no match for call to `(std::string) (int[10], const 
int&)'
        cout << "The maximum element is:  " << arrayMax(num, n) << "\n";
        return EXIT_SUCCESS;
}
 
  g++ 2a.cpp
2a.cpp: In function `int main()':

2a.cpp:14: no match for call to `(std::string) (int[10], const int&)'

[Non-text portions of this message have been removed]


   


      

[Non-text portions of this message have been removed]

Reply via email to