Problem:
I am getting an error from my very simple c++ program. It says invalid conversion from int to int*
What does it actually mean? Why I am experiencing this error? I am attaching my code snippet below. Please, check the code and fix the error if you can.
#include <iostream>
using namespace std;
int main(){
}
int function(int myData[]){
return myData; //error produces here.
}
and the output I am getting is:
invalid conversion from `int*' to `int'
Many thanks for your effort and valuable time, guys.