Ver Mensaje Individual
  #4 (permalink)  
Antiguo 04/05/2011, 09:02
dragg04
 
Fecha de Ingreso: junio-2005
Mensajes: 93
Antigüedad: 18 años, 11 meses
Puntos: 9
Respuesta: Como parametro un String

tambien lo podrias hacer asi

#include <string>

using namespace std;

void mostrarMsg(const string &cadena);

int main()
{
string cadena;

cadena="Hola mundo";

return 0;
}

void mostrarMsg(const string &cadena)
{
printf("%s", cadena.c_str());
}