Thread: Just a few things ...

  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    3

    Just a few things ...

    !st of all i was wondering if i am actually learning the right code lol. I want to get into main programming for games, do i use c++?

    Second thing, i followed the tut on the site , the basic one With the hello world text. And i cant run it... Help?

  2. #2
    Bioport Productions
    Join Date
    Oct 2005
    Posts
    215
    Yes, C++ is the right language for games. As for your problem..well..what is it?
    -"What we wish, we readily believe, and what we ourselves think, we imagine others think also."
    PHP Code:
    sadf 

  3. #3
    Registered User
    Join Date
    Nov 2005
    Posts
    3
    Well i typed out this code:

    Code:
    #include <iostream>
    
    using namespace std;
    
    int main()
    {
      cout<<"HEY, you, I'm alive! Oh, and Hello World!\n";
      cin.get();
    
      return 1;
    }
    I saved it as iostream. I then installed borland compiler or sumthing. If i double click iostram.cpp, a command prompt window flashes up then flashes away. If i open up command prompt then type in the location it says it cant open it.

  4. #4
    Registered User
    Join Date
    Nov 2005
    Posts
    85
    Code:
    #include <iostream>
    
    using namespace std;
    
    int main()
    {
      cout<<"HEY, you, I'm alive! Oh, and Hello World!\n";
      cin.get();
    
      return 0; //returning 0 means successful exit
    }
    use borland to compile and run the program. Should work now.

  5. #5
    Registered User
    Join Date
    Nov 2005
    Posts
    3
    nope it still didnt work. it says it cant open the file...

  6. #6
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Have you compiled the cpp file? usually double clicking on a cpp file will open it in your IDE (or whaterver text editor you have set to open files of this type).
    When compiled you should have an executable files who's extension would be .exe assuming this is a windows sytem.

  7. #7
    Registered User
    Join Date
    Jan 2005
    Posts
    7,366
    You shouldn't save your file as iostream, that is used by the C++ library and will confuse you and us (and possible cause errors). Name it main.cpp or something like that.

    Also, to execute a program usually you double-click the .exe file, not the .cpp file.

  8. #8
    Registered User
    Join Date
    Sep 2004
    Posts
    197
    I think he needs to associate the files with the editor first guys.
    If any part of my post is incorrect, please correct me.

    This post is not guarantied to be correct, and is not to be taken as a matter of fact, but of opinion or a guess, unless otherwise noted.

  9. #9
    Registered User
    Join Date
    Nov 2005
    Posts
    3
    Um nvm guys, i just deleted borland and installed devc++ and it works brilliantly, i love it and everything works!

  10. #10
    Registered User
    Join Date
    Nov 2005
    Posts
    85
    borland sucks anyway, i use quincy and cygwin

  11. #11
    Bioport Productions
    Join Date
    Oct 2005
    Posts
    215
    VS2005 Professional!!! Gotta love to support the hard working developers by paying money for a superb product.



    ModEdit nvoigt
    Last edited by nvoigt; 11-08-2005 at 04:08 AM. Reason: No warez.
    -"What we wish, we readily believe, and what we ourselves think, we imagine others think also."
    PHP Code:
    sadf 

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Suggestions for things to study
    By Mastadex in forum Windows Programming
    Replies: 5
    Last Post: 08-18-2008, 09:23 AM
  2. Plants that eat things
    By StinkyRyan in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 07-05-2004, 03:41 PM
  3. How are things looking
    By cyberCLoWn in forum C++ Programming
    Replies: 8
    Last Post: 01-15-2004, 02:53 PM
  4. Selecting things on the canvas
    By Barjor in forum Windows Programming
    Replies: 0
    Last Post: 08-30-2001, 02:10 PM
  5. Help with these three things...
    By face_master in forum C++ Programming
    Replies: 2
    Last Post: 08-26-2001, 07:05 AM