Gast
#1245430
Hallo, hab meine erste eigene Headerdatei zur Probe geschrieben, leider
kann ich diese nicht kompilieren. Meine Frage ist nun, hab ich irgendwas
falsch gemacht oder vergessen. Hier ma der Text:
#ifndef MULTI_HPP
#define MULTI_HPP
float mul(float x,float y)
#endif
----------------------------------------------------
#include "multi.hpp"
float mul(float x,float y)
{
return (x*y);
}
----------------------------------------------------
#include <cstdlib>
#include <iostream>
#include "multi.hpp"
using namespace std;
int main(int argc, char *argv[])
{
float a = 5;
float b = 5;
float c = mul(a,b);
system("PAUSE");
return EXIT_SUCCESS;
}
---------------------------------
Fehler:
expectet init-declarator before "float"
Build Error multi.o