hi,
ich bin grad wieder einmal am c++ proggen, da morgen wieder Schule ist.
Ich habe da mal ein Prog aus einem Buck abgetippt. Kdevelop weigert sich
aber es auszuf�hren:
make[3]: Entering directory `/home/denny/cpp/test/test'
c++ -DHAVE_CONFIG_H -I. -I. -I.. -O2 -O0 -g3 -Wall -fno-exceptions
-fno-check-new -c main.cpp
main.cpp:38: return type for `main' changed to `int'
make[3]: *** [main.o] Error 1
Wenn ich es unter der Konsole mache mit "g++ -o test02 main.cpp" dann
l�uft es, ich vermute mal das ein Fehler im Programm ist, ich ihn aber
nicht sehe, kommentare (//..) spare ich mir mal:
**********************************************************************
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <iostream.h>
#include <string.h>
class employee {
public:
char name[64];
long employee_id;
float salary;
void show_employee(void)
{
cout << "Name: " << name << endl;
cout << "id: " << employee_id << endl;
cout << "Salary: " << salary << endl;
};
};
void main(void) // Das ist Zeile 38
{
employee worker, boss;
strcpy (worker.name, "John Doe");
worker.employee_id = 12345;
worker.salary = 25000;
strcpy (boss.name, "Denny Schierz");
worker.employee_id = 100;
worker.salary = 50000;
worker.show_employee();
boss.show_employee();
}
----------------------------------------------------------------------------
PUG - Penguin User Group Wiesbaden - http://www.pug.org