Search:

Type: Posts; User: Flaug

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    22
    Views
    12,088

    You could use a 'for' loop.

    You could use a 'for' loop.
  2. Or I'm just too lazy to press the spacebar twenty...

    Or I'm just too lazy to press the spacebar twenty times to indent the code while in the reply text box.


    Whoops! Guess I screwed that one up.....
  3. Thread: Noob Programmer

    by Flaug
    Replies
    4
    Views
    1,083

    "/n" is wrong... it should be "\n" Oh and...

    "/n" is wrong... it should be "\n"
    Oh and variables are case-sensitive meaning that if you capitalize the 'C' in "Choice" you need to keep it that way. "Choice" and "choice" are two totally...
  4. This is because you keep resetting the value of...

    This is because you keep resetting the value of the 'random' variable with a random number after the user guesses.
    I fixed this in the code I gave you. But if you want to still use your code, then...
  5. You need to put 'guess' first. As in: if...

    You need to put 'guess' first.
    As in:

    if (guess > random)
    cout << "Guess was too big\n";
    else if (guess < random)
    cout << "Guess was too small\n";
    else if (guess == random)...
  6. Replies
    15
    Views
    10,493

    That's what I did (in the updated code) ...

    That's what I did
    (in the updated code)

    Thanks for the link!
  7. Replies
    15
    Views
    10,493

    Yes, this is the midpoint-displacement one.... I...

    Yes, this is the midpoint-displacement one.... I would like to dive into the diamond/square algorithm as well, but I think I'm going to work on a fill function for the mountain first like you...
  8. Replies
    15
    Views
    10,493

    Here is what the output of the program looks...

    Here is what the output of the program looks like:
    Mountain
    And here is a nicer photo with a filled in mountain and a sky gradient:
    Filled in mountain
  9. Replies
    15
    Views
    10,493

    Whoops! Turns out there were two reasons why it...

    Whoops! Turns out there were two reasons why it wasn't working.
    #1 - I kept resetting the value of "range" and other important variables whenever the "Complex()" function was ran. To fix this, I...
  10. Replies
    15
    Views
    10,493

    Thank you for pointing that out... But I have...

    Thank you for pointing that out... But I have already changed the range around a lot.
    When the range is set to deplete at about .20 the fractal just turns into a spikey mess.... when the range is...
  11. Replies
    15
    Views
    10,493

    That would help... Thanks for pointing that out....

    That would help... Thanks for pointing that out. That explains a lot.
    The output still looks pretty crappy though.
  12. Replies
    15
    Views
    10,493

    Turns out, I can't edit it? I'll post just the...

    Turns out, I can't edit it? I'll post just the code snippet that I need help with.
    The problem with it is the same as stated above, that said, here it is:


    using namespace std;

    struct Point...
  13. Replies
    15
    Views
    10,493

    Thanks for the reply! I'll try to work on the...

    Thanks for the reply!
    I'll try to work on the stuff you pointed out.
    A lot of that is the result of editing and not removing excess code...

    I wasn't sure if I should post just the function or...
  14. Thread: itoa()

    by Flaug
    Replies
    2
    Views
    933

    It works out great, thanks! I have another...

    It works out great, thanks!
    I have another problem though. All of this code is inside a timer event function, so it all repeats. The string now looks like: X: 400 Y: 300X: 400 Y: 300X: 400 Y: 300X:...
  15. Thread: itoa()

    by Flaug
    Replies
    2
    Views
    933

    itoa()

    Hello-
    I'm trying to figure out how to render the position of my mouse on-screen.
    Is there anyway to convert an integer to a string? I don't want to use char[].



    static std::string mousex,...
  16. Replies
    10
    Views
    3,212

    I can't believe I'm still having trouble with...

    I can't believe I'm still having trouble with this.....
    I have a red line on a black background. When I render the image, the mask works correctly, except that the red line turns black. Why?
    Can...
  17. Replies
    10
    Views
    3,212

    I honestly don't know what I'm doing..... Here is...

    I honestly don't know what I'm doing..... Here is my code:



    void Player::Draw(HWND hWnd)
    {
    HDC hDC = GetDC(hWnd);
    HDC hMemDC = CreateCompatibleDC(hDC);

    HBITMAP hOldBitmap =...
  18. Replies
    10
    Views
    3,212

    I'm having trouble with this for some reason.......

    I'm having trouble with this for some reason....
    I'm not very good at windows programming, do you think you could convert your code to win32 and maybe expand it a little bit?

    When I tried...
  19. Replies
    10
    Views
    3,212

    Awesome, thanks for replying! I'll go try this...

    Awesome, thanks for replying! I'll go try this out.
    Sorry if it was in the wrong section.
  20. Replies
    10
    Views
    3,212

    Image Transparency Routine

    Hello,
    I need help with making my own transparent image routine. Basically, I need to be able to render semi-transparent images on screen using C++... TransparentBlt() just isn't cutting it.

    I...
  21. Replies
    2
    Views
    1,772

    Drawing JPEGs (DirectX?)

    Hello,
    I want to draw JPEGs onscreen, but I have no idea how to approach this. Would DirectX be the easiest way out (when I say "easiest", I mean shortest)? Actually, I would also like to draw...
  22. Replies
    3
    Views
    1,206

    Thanks for all the help!

    Thanks for all the help!
  23. Replies
    3
    Views
    1,206

    Variable Length Arrays

    Hello,
    Is there a way to make a (char) array with a variable length?

    I'm (kind of) working on an "encryption program" that takes a file and encrypts it using a ridiculously simple algorithm (if...
  24. Replies
    36
    Views
    12,024

    This is the last bit of (whole) code I'm giving...

    This is the last bit of (whole) code I'm giving you. From now on you need to try to do this yourself. It's really not very complex stuff:



    #include <iostream>

    using namespace std;

    int...
  25. Replies
    36
    Views
    12,024

    As for what you are doing wrong, check out the...

    As for what you are doing wrong, check out the line with the while loop in it (while (your_answers[count] != 'a' && your_.....)- You have the first evaluation right, but the second third and fourth...
Results 1 to 25 of 46
Page 1 of 2 1 2