User Profile
Collapse
-
i fixed my formula and tried putting all the values in a new array and it worked, thanks! -
oh, well maybe thats what happened in the first place, the image is 200 x 300 pixels.
Anyway i found out that rotating an image by 90 degrees clockwise is the same as transposing it (I hope this is right). So i tought id try to do that in my array of structures.
So im thinking:
in the normal structure the position of a pixel in the image is : i + j * width
...Leave a comment:
-
thanks for your help.
I tried enlarging the array of structures that holds the pixels and the error didnt come up. What came up was a seriously messed up picture :). I guess i gotta figure out how to roate it right. However, it would be really helpful if you could you tell me why the code i posted was wrong.
by the way, i was trying to rotate the image by 90 degrees clockwise.
I thought that i should move...Leave a comment:
-
im not sure i understand the way you do it, but if you wanna enter from the user a number of words with spaces inbetween, using getline is a good idea.
for example:
string answer;
getline(cin, answer);
hope this helpsLeave a comment:
-
Need help rotating a PPM image in c++
Hi, i have an assignment to open PPM images and prompt the user for either brightening, flipping or rotating the image. Ive done the brightening and flipping, but i cant get the rotating to work. When i try to rotate i get an error, although i think the concept is right. With some testing i figured out thet I get the error when x = 4 and y = 1 i think. Memory read access violation or something. Im using Visual C++ 2005 express edition and windows... -
Yeah thanks, i think this part better represents my problem:
...Code:cout <<"Think of an animal and i will try to guess its name" << endl << endl; cout<< game[1].question <<"? [yes/no]" << endl; int c = 1; bool exit = false; while(!exit) { cin >> answer; if(answer == "yes")Leave a comment:
-
sorry i did not mean for you to solve it for me, i just want to know why its not working.
By the way, x is the position of the next empty cell in the array of structures and c is the position of the line.
ThanksLeave a comment:
-
Animal Guessing binary tree game C++
Hi, i have a bit of a problem here.
I have an assignment to do an animal guessing game using an original database and updating it as the user enters new animals in it. The program enters the file data into an array of structures, with the animal and question in the same variable(questi on) and the bool isAnimal tells me whether its an animal or a question. If its a question it is followed by two numbers; one for the position of the...
No activity results to display
Show More
Leave a comment: