Thread: Have I Destroyed Gravity?

  1. #16
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    What ways are there that I can get my program to show me the results of my cos and sin calculations?

  2. #17
    Registered User
    Join Date
    Dec 2006
    Posts
    17
    Quote Originally Posted by bumfluff
    What ways are there that I can get my program to show me the results of my cos and sin calculations?
    Output them somewhere?

  3. #18
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    If it's a full-screen app, preferably to the screen or to a file.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #19
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    Yeah, I don't actually know how to draw text to the screen.

  5. #20
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    I believe D3DX contains some utilities for that.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  6. #21
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    I am afraid that doesn't really help. I don't really know anything about outputting text to the screen in Direct X or Win32. Any help on this matter is appreciated.

  7. #22
    Registered User
    Join Date
    Dec 2006
    Posts
    17
    Quote Originally Posted by bumfluff
    I am afraid that doesn't really help. I don't really know anything about outputting text to the screen in Direct X or Win32. Any help on this matter is appreciated.
    Creating text with D3D, retrieved after an intense 2 minutes googling (Google).

    Or you could just create a plain text file and output everything to that (probably a better idea if you have no clue).

  8. #23
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    Thanks for that, how do I get the function to output an integer as its argument is a string?

  9. #24
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    Convert the integer to a string.

  10. #25
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    Ok I have it drawing text and I have my integer as a std::string but it still won't accept that and it wants an LPCSTR string instead. How do I turn my string into this?

  11. #26
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    c_str()
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Lifetime of temporary during exception throw
    By brewbuck in forum C++ Programming
    Replies: 3
    Last Post: 05-22-2009, 04:08 PM
  2. Platform game gravity problem
    By Akkernight in forum Game Programming
    Replies: 33
    Last Post: 02-22-2009, 01:10 PM
  3. Need help with gravity engine
    By madmech in forum Game Programming
    Replies: 11
    Last Post: 07-03-2005, 02:41 PM
  4. gravity effecting velocity
    By Josh Kasten in forum Game Programming
    Replies: 4
    Last Post: 02-08-2003, 09:22 AM
  5. Gravity? We don't need no steenking gravity!
    By Govtcheez in forum A Brief History of Cprogramming.com
    Replies: 22
    Last Post: 03-28-2002, 07:24 PM