CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 26

Thread: Need Help

Threaded View

  1. #11
    Join Date
    Sep 2002
    Location
    14° 39'19.65"N / 121° 1'44.34"E
    Posts
    9,815
    Originally posted by JerryShane
    This is what I have for when the sin button is pressed. am I getting close?
    Unfortunately, not even a little. Basically, you do nothing different than before: Your loop still lacks a body, you still don't do any sin() calculation involving x and y, the code which calculates the step value for x is still missing, the lines you draw still use fixed coordinates (they don't depend in any way on x and y), it is still unclear what you are doing with m_iSamples and what iSamplesvalue is for, why you use the 'i' prefix for a double variable etc.
    So I ask you once again (for the third time now) to write down in an informal way what your code is supposed to do - step by step. After that, it will be easier to transform that into working code. But if you don't even have an idea about what your code should be doing, than you won't get any furhter just by trying and guessing. It's like you were trying to build an electronic device by just arbitrarily soldering together a handful of transistors, capacitors etc. You first need to plan what your device is meant to do and how it works, and come up with a circuit diagram. After that, you will know which components you need and how to put them together, following the diagram.
    Last edited by gstercken; November 10th, 2003 at 07:15 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured