Sedikit koreksi,
> #include <iostream.h>
#include <iostream>
> #include <string.h>
#include <string>
using namespace std;
>
> class sepatu
> {
> private:
> int tali;
> char merek[50];
> char model[50];
> double harga;
> public:
> void Input_Data_Sepatu(int t, char *m, char *mo, double hrg);
> void Tampilkan_Data_sepatu(void);
seharusnya void Tampilkan_Data_Sepatu(void); lihat huruf "s" seharusnya
"S".
^^^
> };
>
> void sepatu::Input_Data_Sepatu(int t, char *m, char *mo, double hrg)
> {
> tali = t;
> strcpy(merek, m);
> strcpy(model, mo);
> harga = hrg;
> }
>
> void sepatu::Tampilkan_Data_Sepatu(void)
> {
> cout << "Tali sepatu berjumlah : " << tali << endl;
> cout << "Merek sepatu : " << merek << endl;
> cout << "Model sepatu : " << model << endl;
> cout << "Harga sepatu : " << harga << endl;
> }
>
> void main(void)
int main()
> {
> sepatu SepatuSekolah, SepatuKantor;
>
> SepatuSekolah.Input_Data_Sepatu(2, "Eagle","Spot",40000);
> SepatuKantor.Input_Data_Sepatu(0, "Watchout", "Boot", 250000);
>
> SepatuSekolah.Tampilkan_Data_Sepatu();
> SepatuKantor.Tampilkan_Data_Sepatu();
return 0;
> }
>
> [EMAIL PROTECTED] kuliah]$ g++ hal9.cc -o hal9 -Wno-deprecated
>
> hal9.cc:25: no `void sepatu::Tampilkan_Data_Sepatu()' member function
> declared
> in class `sepatu'
> hal9.cc:33: `main' must return `int'
>
>
>
Semoga berhasil
jagad
--
jagad <[EMAIL PROTECTED]>
e-klik innovative group
--
Berhenti langganan: [EMAIL PROTECTED]
Arsip dan info: http://linux.or.id/milis.php