i searched about this error. they said is mostly caused by forgot putting semicolon...
but i find for 1hours+ still cant find out >.< anyone can help me?
the error is pointing test.h lines 9: multiple types in one declaration
test.h:
#ifndef TEST_H_
#define TEST_H_
class TEST
{
public:
//call when pixel haven't allocated
void stPixel ();
};
#endif
test.cpp:
#include <iostream>
#include "Struct.h"
#include "Test.h"
using namespace std;
//struct
extern PIXEL *pixel;
//call when pixel haven't allocated
void TEST :: stPixel ()
{
int size;
cout<<"Enter how many struct pixel you need: ";
cin>>size;
pixel = new (nothrow) PIXEL [size];
if(pixel == 0)
{
cout<<"Error: pixel memory could not be allocated\n";
}
else
{
cout<<"Created pixel struct in size of "<<size<<", key in the numbers to the array\n";
for(int i=0; i<size; i++)
{
cin>>pixel[i].x;
}
for(int i=0; i<size; i++)
{
cout<<pixel[i].x<<" ";
}
}
}