Hmm.. It seems to work either way.
Type: Posts; User: saahmed
Hmm.. It seems to work either way.
Oh, I should have figured that out. Thanks.
Thats not working either for some reason.
One more question. Why wont this work? Im using the OR's correctly right?
if(major!='e'||'h'||'m'||'c'||'b'||'u'){
printf("ERROR! Invalid Error Code Entered\n");
count--;
}
But...
Yeh, figured that out. Also needed a pause at end of main function.
Its all good now.
This involves structures. Basically I created an array of structures and I am supposed to pass it onto a function that was given. This is where my problem is (marked /*HERE*/). I think I am passing...
Im thinking the best way to do this, if possible, is to create a pointer. Go through the each element of the array and dereference it. If it is a 0 leave it. If it is a 1 change it to *. After...
but that wouldnt go through just the first line would it?
I cant think of anyway to get the length of the side of the square without actually passing that to the function (which I am not supposed to do per the assignment).
EDIT: I think I thought of...
hmmm... well I am gonna have to work on this a little, Im still not getting anything. But, I have to study for an exam I have tommorrow, or today I guess.
Thanks for your help qqqxxxx.
Its working? When I enter the size I want, the program just ends without any warnings or anything. But, it doesnt print anything.
well, no, the program is just ending after the user prompt to enter the desired size. This is why I was trying to understand drawImage better.
but the side hasnt been passed on to this function. so this is needed right?
This is true, I am not really understanding the assignment well. I think I understood the part about the canvas and the square being in the center of the canvas, but Im just not understanding how it...
Well here I am just trying to get the length of the square. I was thinking all I needed was the length of a side. Am I wrong?
I just wanted to get this straight because Im not so sure. The drawImage function is creating a square of 1s right? Because when I try out the program with the function I added, it just ends after...
do you think there is any other way to do it?
This is what I got, I know its wrong, but is there something I could change to make it work?
int size=0;
for(r=0;r<25;r++){...
While that may work, I dont think I can really use it because I havent learned anything like that. But i'll look through the book quick and see if it is anywhere, then I could use it.
EDIT:...
does it have anything to do with storing the memory location?
whoops.
Okay, I think I understand what youre saying, but how would I go about doing that?
EDIT:
something like this?
for (r = 0; r < size; r++)
{
for (c = 0; c < size; c++)
Im working on the printImage function. It doesnt require the use of this function. Or maybe I dont know what youre getting at.
I know I need to pass an array to printImage.
EDIT: Wait,...
Okay, so the way Im understanding this is that the drawImage function is creating a square of 1's right? So in my printImage function I can just tell it to change 1's to *? If so, I am only passing...
Oh, I didnt know that. Thanks.
I dont understand the assignment for even. So is that not if the side is an even number? Or is it a typo? Could you just explain it for me please.