I used to program wuite often with C++, but then I stopped and now I have started again, ym problem is with a dll im making:
DLL.H
#ifndef _DLL_H_
#define _DLL_H_
/* Begin User-Defined */
#define export extern "C" __declspec (dllexport)
/* End User Defined */
#if BUILDING_DLL
# define DLLIMPORT __declspec (dllexport)
#else /* Not BUILDING_DLL */
# define DLLIMPORT __declspec (dllimport)
#endif /* Not BUILDING_DLL */
class DLLIMPORT DllClass
{
public:
DllClass();
virtual ~DllClass(void);
private:
};
#endif /* _DLL_H_ */
DLLMAIN.CPP
#include "dll.h"
#include <windows.h>
int objects[500][4];
int max_objects=0;
export double initPhys1kz(double objects)
{
max_objects=objects;
for(int count=0;count<max_objects;count++){
objects[count][1]=0;
objects[count][2]=0;
objects[count][3]=0;
objects[count][4]=0;
}
return double(1);
}
These errors are returned:
10 [file path] [Warning] converting to `int' from `double'
14 [file path] invalid types `double[int]' for array subscript
15 [file path] invalid types `double[int]' for array subscript
16 [file path] invalid types `double[int]' for array subscript
17 [file path] invalid types `double[int]' for array subscript
If it helps im using DevC++ by bloodshed.
Please tell me what these errors mean.