Making anything...period

This is a discussion on Making anything...period within the Game Programming forums, part of the General Programming Boards category; Please Help Me!!!! Could anyone here please explain to me in an easy to understand (newbie) way on how to ...

  1. #1
    I am he who is the man! Stan100's Avatar
    Join Date
    Sep 2002
    Posts
    361

    Exclamation Making anything...period

    Please Help Me!!!! Could anyone here please explain to me in an easy to understand (newbie) way on how to even draw something please!!! I'm Desperate and your my last chance!

  2. #2
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    moveTo and Lineto will drawl something, heres an example: This will drawl Hello World inside of two lines.

    Code:
    /*	Steven Billington
    	September 9, 2002
    	hwgraphics.cpp
    	This program will display hello world with lines around it. Simple
    	graphics demonstration.
    */
    
    #include <graphics.h>
    
    int main ()
    
    {
    
    	lineTo (100,100);
    
    	moveTo (50,50);
    
    	lineTo (50,0);
    
    	moveTo (50,50);
    
    	lineTo (150,50);
    
    	outText (55,100, "HelloWorld!");
    
    	moveTo (50,130);
    
    	lineTo (150,130);
    
    	return 0;
    
    }

  3. #3
    Registered User xds4lx's Avatar
    Join Date
    Nov 2001
    Posts
    630
    First off not to be rude thats a horrible example because graphics.h is not standard, its old as hell which means you must be using borland turbo C/C++ 3.1 or earlier.
    "only two things are infinite, the universe and human stupidity, and im not sure about the former." - albert einstein

  4. #4
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    its old as hell which means you must be using borland turbo C/C++ 3.1 or earlier.
    Visual C++ .NET actually, the graphics.h file i use is from the student files that go with my CS2 book.

    Sorry if it sucks but he said ANYTHING. It doesn't seem hes put much effort into finding it himself so i didn't put an incredible amount of effort into my example.

  5. #5
    I am he who is the man! Stan100's Avatar
    Join Date
    Sep 2002
    Posts
    361

    tried

    I tried graphics.h and it said no such directory (by the way im using DJGPP) please help
    Why are Greenboards White?

  6. #6
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    graphics.h is attached

  7. #7
    fry
    fry is offline
    Registered User fry's Avatar
    Join Date
    Mar 2002
    Posts
    128
    Umm, you can't just download a header and expect it to work. Check the FAQ to see why
    IDE: Dev C++ 5
    Lib: Allegro
    OS: Windows 2000

  8. #8
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    in this instance u can because the code i wrote is specified to the book that the header is made for.

  9. #9
    Registered User Kirdra's Avatar
    Join Date
    Aug 2002
    Posts
    105
    With that attitude you wont learn anything Stan. heres something for you to play with

    Code:
    #include <iostream>
    
    int main()
    {
        cout << "Hello";
        return 0;
    }

  10. #10
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    That's not right either, Kirdra.

    Code:
    #include<iostream>
    
    using namespace std;
    
    int main()
     {
       cout << "Hello World";
      
       return 0;
     }

  11. #11
    Registered User Kirdra's Avatar
    Join Date
    Aug 2002
    Posts
    105
    I never use; using namespace std... I read I didn't "need" to.

  12. #12
    I am he who is the man! Stan100's Avatar
    Join Date
    Sep 2002
    Posts
    361

    Lightbulb I know

    I know somewhat how to program. I can print words on the screen etc. I don't know how to make graphics. Whenever I try to use <graphics.h> or "graphics.h" it says unknown file and i have the allegro files. HELP!

  13. #13
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    That's not right either, Kirdra.
    thats actually quite rite.

    There is no need to use namespace here, and her example is fine for what it is.

    Stan thats because u need to have graphics.h installed, use the download i supplied for you to get it.

  14. #14
    I am he who is the man! Stan100's Avatar
    Join Date
    Sep 2002
    Posts
    361

    Unhappy I have it and it doesn't owrk

    I have the file, it's in my allegro folder, but it (DJGPP) doesn't reconnize it HELP!!

  15. #15
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    hmm other than here i don't know man

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Making great graphics
    By MadCow257 in forum Game Programming
    Replies: 1
    Last Post: 02-20-2006, 11:59 PM
  2. Adding trial period to software
    By BobS0327 in forum C Programming
    Replies: 17
    Last Post: 01-03-2006, 02:13 PM
  3. Making control...
    By Finchie_88 in forum C++ Programming
    Replies: 2
    Last Post: 09-07-2004, 02:42 PM
  4. Replies: 2
    Last Post: 01-13-2003, 01:28 PM
  5. About Unix Programming - Making a career desision
    By null in forum C Programming
    Replies: 0
    Last Post: 10-14-2001, 08:37 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21