Aqui el codigo:
Código C++:
Ver original
#include <iostream> #include <stdarg.h> #include <stdlib.h> using namespace std; void pause() { cout << "Presione Enter para finalizar..." << endl; char c; do { } while (c != '\n'); } char* MultiCad(int, ...); int maxLong(char* cadena) { int x=0; while(cadena[x] != '\0')x++; return x; } int main() { pause(); return 0; } char* MultiCad(int max, ...) { va_list p; int ac_size=0; int ac_x=0; for (int x=0; x < max; x++) { ac_size += maxLong(temp); for (int y=0; y < maxLong(temp); y++) Cadena[ac_x++] = temp[y]; } Cadena[ac_size] = '\0'; return Cadena; }