I got it working , can someone please delete my attached files to avoid plagiarism
Printable View
I got it working , can someone please delete my attached files to avoid plagiarism
................. working
Vista like to spring this kinda stuff on me all the time :'(Quote:
it says permission denied
If these are just warnings maybe I can still run it ?
Please help , I have no idea how to get it working .....
This looks odd to me, and apparently your compiler too. I don't have your header.Code:int (*Image_invert(int image_data[EP100_LIB_MAX_X][EP100_LIB_MAX_Y]))[]
Header ? Do you mind checking the Image.c file , I' m not able to post the contents now , the network is clogged up at uni , and I can't even get terminal to open .
Without it, my compiler complains differently.Code:#include "ep100lib.h"
The header is present in both Image.c and the Image_lib.c ??
To you.
If you are asking folks here to make stuff up and guess how to help, it makes for a long and difficult journey.
Then again, I'm off my game again lately.
Uhm I just don't know how to solve my errors . I gave you all the information I can .
Image.c contains this line
#include "Image_lib.c"
It should be written as
#include "Image_lib.h"
Where Image_lib.h is a new file containing
Image_lib.c should also include this file as well.Code:#ifndef IMAGE_LIB_INCLUDED
#define IMAGE_LIB_INCLUDED
#define EP100_LIB_MAX_X 1024
#define EP100_LIB_MAX_Y 1024
int (*Image_invert(int image_data[EP100_LIB_MAX_X][EP100_LIB_MAX_Y]))[];
// A procedure that will scroll an image horizontally and return back into matrix
void Image_horizontal_scroll(int image_data[EP100_LIB_MAX_X][EP100_LIB_MAX_Y], int scroll, int height, int width);
// A procedure that will scroll an image vertically and return back into matrix
void Image_vertical_scroll(int image_data[EP100_LIB_MAX_X][EP100_LIB_MAX_Y], int scroll, int height, int width);
#endif
After that, your scroll functions need looking at because I don't think they're returning the modified result.
The EP100... constants should really come from teh EP100 lib file, if I've understood the other thread.
But the halucinogenic drugs influencing the teacher is springing up again: Apparently, the students have been told to create TWO source files, one main and one which contains the image_invert. So an extra header file is (from what I understand) not allowed... Stupid rules - I can understand rules that say "You can't use this library function, because you should be implementing it yourself". But I don't see the point of teaching really bad habits.
--
Mats
>I got it working , can someone please delete my attached files to avoid plagiarism
Don't do that, what if someone else has the same or similar problem?
If you want to avoid plagiarism, don't post your code in the first place.