• Lucid Dreaming - Dream Views




    Page 1 of 2 1 2 LastLast
    Results 1 to 25 of 31
    1. #1
      Emotionally unsatisfied. Sandform's Avatar
      Join Date
      Jul 2007
      Gender
      Location
      Texas
      Posts
      4,298
      Likes
      24

      Ask/Tell about --- Coding. Programming. General script writing.

      I've played around a bit in Java before, not getting past a few lessons short of making a tetris game hehe. But I'm trying my hand at learning it again. I feel cheated though when I try to write programs, it feels like all the work has been done for me and all I'm doing is tracing other peoples steps. Anyways...C ++ here I come.

      http://www.cprogramming.com/tutorial.html

      Taking free tutorials but I decided to make this a ask and tell thread (as in you can tell me what ever you like, and I am going to ask whatever I want =P.)

      I will probably be dropping in little things that tickle me as I'm doing it as well as providing you guys with any original content that I create. I don't intend on flooding you guys with with HELLO WORLD! Or random number generators hehe.

    2. #2
      The Blue dreamer bluefinger's Avatar
      Join Date
      Apr 2007
      Gender
      Location
      UK
      Posts
      1,629
      Likes
      0
      Coding.... Best tip: Never try to reinvent the wheel. Seriously, if someone did something which works and does not like someone's nightmare in code form, then use it.

      C++ is good, but hard. I know it, since I had to program in it (normal software AND graphics programming). Java is okay, used it for networking programs. Other languages include Turbo Pascal and Visual Basic.
      -Bluefinger v1.25- Enter the madness that are my dreams (DJ Update, non-LD)

      "When you reject the scientific method in order to believe what you want, you know that you have failed at life. Sorry, but there is no justification, no matter how wordy you make it."

      - Xei

      DILD: 6, WILD: 1

    3. #3
      Emotionally unsatisfied. Sandform's Avatar
      Join Date
      Jul 2007
      Gender
      Location
      Texas
      Posts
      4,298
      Likes
      24
      I've done some visual basic as well. +=). But my skill level is still at that which is

      Do this: ****
      Ok...Cool that worked.
      Do this: ****
      Ok...wait it isn't working....maybe if I cut and paste...Hey that worked...but mine didn't, let me do it again...hey it still isn't working and it is exactly the same!


      Lol.

      It isn't so much that I want to invent the wheel it is just that it feels like...it feels more like I'm piecing together a puzzle than creating one when I code....even if it is "original" in some respects (since I have done a few original one using pieces of other programs.)

      What do you do btw blue?
      Last edited by Sandform; 07-30-2008 at 04:47 PM.

    4. #4
      The Blue dreamer bluefinger's Avatar
      Join Date
      Apr 2007
      Gender
      Location
      UK
      Posts
      1,629
      Likes
      0
      Quote Originally Posted by Sandform View Post
      I've done some visual basic as well. +=). But my skill level is still at that which is

      Do this: ****
      Ok...Cool that worked.
      Do this: ****
      Ok...wait it isn't working....maybe if I cut and paste...Hey that worked...but mine didn't, let me do it again...hey it still isn't working and it is exactly the same!


      Lol.

      It isn't so much that I want to invent the wheel it is just that it feels like...it feels more like I'm piecing together a puzzle than creating one when I code....even if it is "original" in some respects (since I have done a few original one using pieces of other programs.)
      To be honest, that is what programmers do. They piece together the program with code that works. What is original is then getting all the pieces to work together with as few bugs as possible. It is a weird way of doing things, but it is the reality,
      -Bluefinger v1.25- Enter the madness that are my dreams (DJ Update, non-LD)

      "When you reject the scientific method in order to believe what you want, you know that you have failed at life. Sorry, but there is no justification, no matter how wordy you make it."

      - Xei

      DILD: 6, WILD: 1

    5. #5
      Emotionally unsatisfied. Sandform's Avatar
      Join Date
      Jul 2007
      Gender
      Location
      Texas
      Posts
      4,298
      Likes
      24
      Quote Originally Posted by bluefinger View Post
      To be honest, that is what programmers do. They piece together the program with code that works. What is original is then getting all the pieces to work together with as few bugs as possible. It is a weird way of doing things, but it is the reality,
      I've learned that since I started...I was put off of the idea originally but now I might as well get used to it. I have an old friend who is a coder from back when coding just started out. She was originally a librarian but then they got a new "toy" and no one knew how to use it so she started playing with it and that started her into coding and now there are lots of businesses that have old systems need her but I think she is retired now...anyway the point of the story is that when I first started thinking about it and I told her that I didn't like coding because it was a lot simpler than I thought it would be she said "people think we walk on water but we just know where the stones are hidden."

      I guess what I'm saying is I would like to know why my code is doing what it is doing vs. why the program is doing what it is doing...

      (the program does what it does because the code said so...but the code is doing it because the systems says so hehe.)
      Last edited by Sandform; 07-30-2008 at 05:02 PM.

    6. #6
      Banned
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,864
      Likes
      386
      Coding is fun.

      Especially low-level languages like C++ and D, ASM, etc. YOU CAN DO ANYHTING WITH THEM.

    7. #7
      Emotionally unsatisfied. Sandform's Avatar
      Join Date
      Jul 2007
      Gender
      Location
      Texas
      Posts
      4,298
      Likes
      24
      What have you done with it Seis?

    8. #8
      Banned
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,864
      Likes
      386
      All kinds of shit.

      Mostly just playing around with engines like Irrlicht, or learning APIs like OpenGL, Win32, ALLEGRO, etc.

      I do, however, plan on making a full-fledged simulator with C++ w/ ALLEGRO and OpenGL.

      I've made games like blackjack games, text adventures, etc.

      All in C++.

      With DarkBASIC Pro I've made some stuff as well, but I like C++ much more. It's the best language IMO.

      I've also screwed about with VB.NET, C#.NET, Java, and ASM.

    9. #9
      Emotionally unsatisfied. Sandform's Avatar
      Join Date
      Jul 2007
      Gender
      Location
      Texas
      Posts
      4,298
      Likes
      24
      I'm having troubles with mine right now...no matter what I put in the lines it says "hello world" instead of what I type lol.

      Fix it though the cin.get(); command isn't working.
      Last edited by Sandform; 07-30-2008 at 06:43 PM.

    10. #10
      Banned
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,864
      Likes
      386
      What is your code?

      What compiler are you using?

    11. #11
      Emotionally unsatisfied. Sandform's Avatar
      Join Date
      Jul 2007
      Gender
      Location
      Texas
      Posts
      4,298
      Likes
      24
      #include <iostream>

      using namespace std;

      int main()
      {
      cout<<"HEY, you, I'm alive! Oh, and Hello World!\n";
      cin.get();

      return 1;
      }



      Borland C++ Compiler 5.5


      It doesn't recognize cin.get as a command so I'm assuming it must not be a part of the language that this one has.

    12. #12
      Banned
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,864
      Likes
      386
      Hrm...

      I'm not familiar with Borland C++, but I know its old.

      You might want to get a more updated compiler with a more accurate standard.

      Try these IDEs:

      wxDev-Cpp
      DevCpp
      Code::Blocks

      All use the MinGW Compiler.

    13. #13
      FBI agent Ynot's Avatar
      Join Date
      Oct 2005
      Gender
      Location
      Southend, Essex
      Posts
      4,337
      Likes
      14
      Quote Originally Posted by Sandform View Post
      #include <iostream>

      using namespace std;

      int main()
      {
      cout<<"HEY, you, I'm alive! Oh, and Hello World!\n";
      cin.get();

      return 1;
      }
      just a few things,
      avoid using "using"
      I know all the tutorials use it, but it can bite you in the arse
      (it pulls all the functions and objects into the current namespace, and can lead to naming conflicts)
      personally, I think it's really bad practise
      but others may say different

      but try to get into the habit of fully qualifying object calls
      std::cout
      (that's 2 colons)

      also, use std::endl instead on \n for newlines
      \n is an absolutely rigid instruction to the machine to output a linefeed character
      and different systems deal with new lines differently
      (*nix uses \n, Mac uses \r, Windows uses \r\n)

      now, compilers *should* automatically "do the right thing" and interpret the \n to mean whatever the system needs it to mean,
      but you're putting trust in the compliance and intelligence of the compiler

      the way you've used cin.get() is horrible
      you often see this sort of thing on windows programming forums / tutorials as a way of stopping the DOS box from closing automatically
      but it's absolutely horrid, and will break your program if you want to use piping or other forms of command chaining

      if you don't want your DOS box to close, open a terminal window, and execute your program rather than double clicking it in windows explorer

      lastly, you're exiting with 1
      if a program finishes with no problems, you should exit with 0
      other values are used to indicate a problem

      I would rewrite your code as:
      Code:
      #include <iostream>
      
      int main()
      {
        std::cout << "HEY, you, I'm alive! Oh, and Hello World!" << std::endl;
      
        return 0;
      }
      Last edited by Ynot; 07-31-2008 at 01:22 AM.

    14. #14
      Banned
      Join Date
      Apr 2007
      Location
      Out Chasing Rabbits
      Posts
      15,193
      Likes
      935
      I like "using namespace std" rather than using std::

    15. #15
      Banned
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,864
      Likes
      386
      'Using namespace std/ w/e' saves time writing out std:: and minimizes the chance you'll mistype std::cout or cin or whatever you are using.

    16. #16
      Member Serith's Avatar
      Join Date
      Feb 2007
      Gender
      Location
      Minnesota
      Posts
      435
      Likes
      1
      I'm trying to learn C++, and I'm figuring out the basics without much trouble. The only problem is, I'm not very interested in creating text-only programs, but the tutorial I'm using gives no information about going beyond just using terminal. Where's the best place to find out how to do that?

      Also, right now I'm using Microsoft Visual C++ Express edition as my compiler. Is this a good program? Is there a better alternative for Windows XP?

    17. #17
      Banned
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,864
      Likes
      386
      0That's getting into APIs, and Engines, etc. Graphics, that is.

      The "basics" are pretty much a small part of the STL, and the language itself.

      Everything else is extra.

    18. #18
      Banned
      Join Date
      Apr 2007
      Location
      Out Chasing Rabbits
      Posts
      15,193
      Likes
      935
      C++ is hard to learn as a first language. Might I suggest regular C first. C++ is just a superset (for the most part) of C.

    19. #19
      Gentlemen. Ladies. slayer's Avatar
      Join Date
      Mar 2007
      Gender
      Location
      Right here... Reputation: 9999
      Posts
      4,902
      Likes
      473
      DJ Entries
      4
      Um...no idea if this falls under the same catagory...

      But you know anything about html? I have a transparent picture and I want to get the google search engine ontop of it.

      I have both the engine and the picture on my webpage but I can only place the engine below, above, or to the sides of the picture. Even if I center it, it doesn't go in the center of the page how I want it. It only centers above or below the picture.

    20. #20
      Emotionally unsatisfied. Sandform's Avatar
      Join Date
      Jul 2007
      Gender
      Location
      Texas
      Posts
      4,298
      Likes
      24
      Quote Originally Posted by slayer View Post
      Um...no idea if this falls under the same catagory...

      But you know anything about html? I have a transparent picture and I want to get the google search engine ontop of it.

      I have both the engine and the picture on my webpage but I can only place the engine below, above, or to the sides of the picture. Even if I center it, it doesn't go in the center of the page how I want it. It only centers above or below the picture.
      Well I took a class that covered this breifly when I was in 6th grade...as a sub category of general computer knowledge. So I might be able to help you lol. It might be helpful if you give us a link to the webpage or the code you're using.

      Other than that all I can say is go here. http://www.w3schools.com/HTML/html_examples.asp

    21. #21
      Your cat ate my baby Pyrofan1's Avatar
      Join Date
      Nov 2006
      Gender
      Posts
      720
      Likes
      3
      The only problem is, I'm not very interested in creating text-only programs, but the tutorial I'm using gives no information about going beyond just using terminal. Where's the best place to find out how to do that?
      http://nehe.gamedev.net/
      that site has loads of incredible openGL tutorials if you're looking for graphics. If you're looking at GUI programs i'm sure there are tons of tutorials online about how to use the windows API.
      Last edited by Pyrofan1; 07-31-2008 at 09:59 AM.

    22. #22
      FBI agent Ynot's Avatar
      Join Date
      Oct 2005
      Gender
      Location
      Southend, Essex
      Posts
      4,337
      Likes
      14
      Quote Originally Posted by ninja9578 View Post
      I like "using namespace std" rather than using std::
      Quote Originally Posted by Seismosaur View Post
      'Using namespace std/ w/e' saves time writing out std:: and minimizes the chance you'll mistype std::cout or cin or whatever you are using.
      that's all fine and everything,
      but as I said, it *can* bite you in the arse

      I can quite happily do:

      Code:
      #include <yada>
      
      namespace my_app
      {
          class cout
          {
              if ( ! check_permissions() )
              {
                  throw new exeption::permission_failure;
              }
      
              if ( ! sanity_checks() )
              {
                  throw new exception::unknown;
              }
      
              log_important_stuff();
      
              std::cout << cout_value;
          }
      }
      
      
      .......
      .......
      
      int main()
      {
          #include <standard stuff>
          #include <my_app/cout>
      
          my_app::cout << "hello";
      }

      using "using", this will fail horribly

    23. #23
      Emotionally unsatisfied. Sandform's Avatar
      Join Date
      Jul 2007
      Gender
      Location
      Texas
      Posts
      4,298
      Likes
      24
      Blue hey, do you think I'll lose anything if I start out with microsoft visual basic?

      I decided it would be easier since it gives you free tutorials with download.

    24. #24
      FBI agent Ynot's Avatar
      Join Date
      Oct 2005
      Gender
      Location
      Southend, Essex
      Posts
      4,337
      Likes
      14
      Quote Originally Posted by Sandform View Post
      do you think I'll lose anything if I start out with microsoft visual basic?
      respect

      I kid, I kid....

    25. #25
      Emotionally unsatisfied. Sandform's Avatar
      Join Date
      Jul 2007
      Gender
      Location
      Texas
      Posts
      4,298
      Likes
      24
      Quote Originally Posted by Ynot View Post
      respect

      I kid, I kid....
      Is it that bad? lol.

    Page 1 of 2 1 2 LastLast

    Bookmarks

    Posting Permissions

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