Estuve tratando de hacer un codigo con dev c++ que llame a una funcion y devuelva un string con int pero no he podido encontrar solucion. Alguien se le ocurre alguna forma de hacerlo de manera simple.
Gracias, cualquier aporte me serviria de mucho.
Aqui esta el codigo :
Código
#include <iostream> #include <string> using namespace std; int x; int y; string retornar (int x,int y) { return "el numero es"<<to_string(x); } int main() { cout<<"escriba y "<<endl; cin>>y; cout<<"escriba x "<<endl; cin>>x; cout<<retornar(x,y); system("pause"); return 0; }