Problem with main()


#include <iostream>
#include <cstdlib>

#include "10_exampr1.cpp"
using namespace std;

void includeName();

char GetString(char *msg);

struct PersonNode{
char name[20];
int age;
};

void includeName()
{
PersonNode newName;
PersonNode newAge;
newName.name = GetString ("Entre Nombre:");
newAge.name = GetString ("Entre Edad:");
PersonNode.name.insert(newName);
PersonNode.age.insert(newAge);

}
char* GetString (char *msg)
{

char input.open( s.c_str() ) , i,*destinoItem;
cout<< msg;
cin.get(s,20);
while (cin.get(s[20]) && s[81] !='\n');// no permite overflow
destinoItem = new char[strlen (s)+1];
for (i = 0; destinoItem[i] = toupper(s[i]); i++);
return destinoItem;

}

main()
{
int option;
// int start = NULL;
do
{

Desplegalinklist <int> theList;
// Desplegalinklist <int> theList = theList.FindItemDesp ( );



theList();
cout << endl;
cout << "Elija una opcion: " << endl;
cout << "0. Salida programa." << endl;
cout << "1. Iserta un nodo al inicio de la lista." << endl;
// cout << "2. Inicia Busqueda en el programa." << endl;
// cout << "3. Move the current pointer back one node." << endl;
cout << endl << " >> ";
cin >> option;

switch (option)
{
case 1 : theList.includeName() ; break;
// case 2 : theList.FindItemDesp(); break;
//case 5 :Posicion_anterior_actual ;
return option;
}
}
while (option != 0);
};













10_Pruexamprogram1.cpp: In function âvoid includeName()â:
10_Pruexamprogram1.cpp:20: error: incompatible types in assignment of âcharâ to âchar [20]â
10_Pruexamprogram1.cpp:21: error: incompatible types in assignment of âcharâ to âchar [20]â
10_Pruexamprogram1.cpp:22: error: expected unqualified-id before â.â token
10_Pruexamprogram1.cpp:23: error: expected unqualified-id before â.â token
10_Pruexamprogram1.cpp: In function âchar* GetString(char*)â:
10_Pruexamprogram1.cpp:26: error: new declaration âchar* GetString(char*)â
10_Pruexamprogram1.cpp:9: error: ambiguates old declaration âchar GetString(char*)â
10_Pruexamprogram1.cpp: In function âchar* GetString(char*)â:
10_Pruexamprogram1.cpp:29: error: expected initializer before â.â token
10_Pruexamprogram1.cpp:31: error: âsâ was not declared in this scope
10_Pruexamprogram1.cpp:33: error: âdestinoItemâ was not declared in this scope
10_Pruexamprogram1.cpp:34: error: âiâ was not declared in this scope
10_Pruexamprogram1.cpp: In function âint main()â:
10_Pruexamprogram1.cpp:51: error: no match for call to â(Desplegalinklist<int>) ()â
10_Pruexamprogram1.cpp:63: error: âclass Desplegalinklist<int>â has no member named âincludeNameâ
Topic archived. No new replies allowed.