I need to make a 2-D array based on command line argumnets.
The program is supposed to compress an image in raw format. The command line is: compress filename width height
I have:
Code:
int main (int argc, char* argv[]){
int width, height;
FILE* fp;
char image[][];
if(argc != 4) message();
width = atoi(argv[2]);
height = atoi(argv[3]);
return(0);
}
How can I set the width and height of the image array?
Any help would be appreciated and I hope I'm not just being stupid. Thanks.
Oh, and one more question while I'm here:
How can I modify values bit-by-bit. Thanks again