User Profile

Collapse

Profile Sidebar

Collapse
Kraken
Kraken
Last Activity: May 13 '07, 01:15 PM
Joined: Mar 23 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Kraken
    replied to Need help rotating a PPM image in c++
    in C
    i fixed my formula and tried putting all the values in a new array and it worked, thanks!
    See more | Go to post

    Leave a comment:


  • Kraken
    replied to Need help rotating a PPM image in c++
    in C
    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
    ...
    See more | Go to post
    Last edited by Kraken; Apr 2 '07, 07:50 PM. Reason: mistype

    Leave a comment:


  • Kraken
    replied to Need help rotating a PPM image in c++
    in C
    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...
    See more | Go to post

    Leave a comment:


  • Kraken
    replied to Inputting Data which contain spaces.
    in C
    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 helps
    See more | Go to post

    Leave a comment:


  • Kraken
    started a topic Need help rotating a PPM image in c++
    in C

    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...
    See more | Go to post

  • Kraken
    replied to Animal Guessing binary tree game C++
    in C
    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")
    ...
    See more | Go to post

    Leave a comment:


  • Kraken
    replied to Animal Guessing binary tree game C++
    in C
    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.

    Thanks
    See more | Go to post

    Leave a comment:


  • Kraken
    started a topic Animal Guessing binary tree game C++
    in C

    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...
    See more | Go to post
    Last edited by RedSon; Mar 23 '07, 03:46 PM. Reason: Please post only relavent code.
No activity results to display
Show More
Working...