Function

helo i make a coding to input some data and when I already input it, i want see my data list.. but i got an error... can u help me please...
this my coding

#include<stdio.h>
#include<conio.h>
#include<iostream>
#include <vector>

struct mahasiswa {

int nim;
char nama;
char kls;
char jurusan;
char jmlh;
};

int *input(struct mahasiswa mhs[])
{
system("cls");
int data,i;


printf("Masukan Jumlah Data : ");scanf("%d",&data);
// mahasiswa mhs[data];

for (i=0; i<data;i++)
{
printf("Masukkan Data ke %d \n",i+1);
printf("Masukan Nim : ",i);scanf("%d",&mhs[i].nim);
printf("Masukan Nama : ",i);scanf("%s",&mhs[i].nama);
printf("Masukan Kelas : ",i);scanf("%s",&mhs[i].kls);
printf("Masukan Jurusan : ",i);scanf("%s",&mhs[i].jurusan);
printf("\n");

system("cls");

}
//return ;


}
void list(struct mahasiswa mhs[],int a)
{

//mahasiswa mhs[a];
for(int i=0; i<a; i++)
{

printf("Data Ke %d",i+1);
printf("\nNim :%d",mhs[i].nim);
printf("\nNama :%s",mhs[i].nama);
printf("\nKelas :%s",mhs[i].kls);
printf("\nJurusan :%s",mhs[i].jurusan);
printf("\n");
}
system("pause");
}


main(){
awal:


int n,i,data;
mahasiswa mhs[data];
//input(mhs)-> mhs[].jmlh;
printf("MENU UTAMA\n");
printf("----------\n");
printf("1.INPUT DATA\n");
printf("2.EDIT\n");
printf("3.SEARCH\n");
printf("4.LIST DATA\n");
printf("5.DELETE\n");
printf("6.EXIT\n");
printf("masukan menu anda : ");scanf("%d",&n);
if(n==1)
{
for(int h=0;h<n;h++)
*input(mhs);

}


else if(n==4)
{
list(mhs,data);

}

else if(n==6)
{
goto akhir;
}

else
printf("Tidak Ada Di Daftar Menu\n");

goto awal;

akhir:
system("pause");



}
*input(mhs);

The function is not named *input. The function is named input.


As an aside, this is horrific code that has goto sprinkled unnecessarily, will not compile with a modern C++ compiler, makes use of system, and uses printf and scanf instead of sensible C++ alternatives like cout and cin.
Topic archived. No new replies allowed.