Page 1 of 13 12311 ... LastLast
Results 1 to 10 of 124
  1. #1
    Persona User xneoangel's Avatar
    Join Date
    Aug 2005
    Location
    Tamriel
    Posts
    442

    I want to learn some programming

    As the title says "I want to learn some programming", but well i don't know nothing about it, so i'd like you guys to tell me with which programming language i should start and if you can tell me of some sites that have some documentation on that language so i can get started.

    My goal is to make emulators, i should start with a Chip8 one but well i have to learn a programming language first so i should stop daydreaming for now

    "Mama we all go to hell, it's really quite pleasant except for the smell"


    • Advertising

      advertising
      EmuTalk.net
      has no influence
      on the ads that
      are displayed
        
       

  2. #2
    Sony battery Toasty's Avatar
    Join Date
    Dec 2004
    Location
    Oregon, U.S.A.
    Posts
    2,048
    C and C++ are good languages for writing emulators, but depending on how your brain works, you may or may not want to start out with one of them. I struggled for a long time trying to learn C and C++ when I first wanted to learn how to program, but I just didn't get it. At the time I already knew HTML and JavaScript (I knew how to script, but not program), so I stuck with those for a while. Eventually I finally took it upon myself to learn Java, and after a few months of confusion, the whole object-oriented concept clicked. I got to where I was comfortable writing in Java and then moved on to C#. After learning those two, I came back to C and C++ and they were very natural to me, since they shared many syntactic and conceptual similarities with my previously learned languages.

    On the other hand, there are many people who pick up on C/C++ very quickly with no previous programming experience. Download a C++ compiler and IDE (Dev-C++ is free and easy to set up) and try one of the beginner C++ tutorials (Google for it). If you are having a hard time understanding what's going on you might want to try something different and then come back to C++ later.
    Last edited by Toasty; September 19th, 2006 at 04:58.

  3. #3
    Moderator aprentice's Avatar
    Join Date
    Nov 2001
    Posts
    1,390
    I started out with a DOS programming book for C. I didn't have to focus on windows specific code so I was able to pick up C quicker. I'd recommend a C programming book for DOS first if thats the language your interested in learning, it seemed a lot easier for me at least.

  4. #4
    Persona User xneoangel's Avatar
    Join Date
    Aug 2005
    Location
    Tamriel
    Posts
    442
    Ok i downloaded Dev-C++ and found a tutorialtutorial which seems nice but well iom already having problems , there are some words which i don't understand like preprocessor and iostream, is there any site where i can find definitions of words like these i mentioned?

    Hmmm i'd prefer to learn it on a windows environment since i only have basic knowledge of DOS, im 16 and i really never used it much so well that would mean to learn DOS as well which would be troublesome IMO, anyway thanks for your support.

    EDIT: I found this definition of preprocessor.
    In computer science, a preprocessor is a program that processes its input data to produce output that is used as input to another program.

    So lets see if i got it right.

    #include <iostream>
    So iostream would be the preprocessor right? so iostream will use its input data to produce an output which will be used as input data by the compiled program right?

    So basically im telling the program to include iostream data in it right?
    Last edited by xneoangel; September 19th, 2006 at 06:31.
    "Mama we all go to hell, it's really quite pleasant except for the smell"

  5. #5
    Sony battery Toasty's Avatar
    Join Date
    Dec 2004
    Location
    Oregon, U.S.A.
    Posts
    2,048
    #include<iostream> basically incorporates the header file, iostream into your program. iostream is part of the C++ standard library, and by including its contents in your program, you are able to use functions, definitions and classes in that file. All the lines that start with a # are preprocessor directives. The preprocessor makes intermediate changes to your code that you never have to see, but that the final compiler will see. #include basically means copy all the code from this file (in this case, iostream) into my file.

    Suppose we have a header file of our own that looks like this (we'll name it "MyHeader.h"):
    Code:
    int MyAddFunction(int a, int b) {
      return a + b;
    }
    And then we include it in your hello world program like so:
    Code:
    #include<iostream>
    #include "MyHeader.h"
    
    using namespace std;
    
    int main() {
      
      cout << "Hello World!" << endl;
      
      return 0;
      
    }
    Basically, this tells the preprocessor to copy all the code from our header into this file. After the preprocessor does its work, the final compiler sees this:
    Code:
    /*The contents of iostream goes here, but it's way too long to post*/
    
    int MyAddFunction(int a, int b) {
      return a + b;
    }
    
    using namespace std;
    
    int main() {
      
      cout << "Hello World!" << endl;
      
      return 0;
      
    }
    In essence, it's a way to virtually copy code into our source file without making the source file huge in the process, which makes code a lot more manageable. It's also handy when you want to use the same code in many different source files, which will be important in bigger programs. The reason the tutorial told you to include that file is because it contains the definition for cout (short for "console out", BTW), which you will use to print text to the console.
    Last edited by Toasty; September 19th, 2006 at 07:07.

  6. #6
    EmuTalk Member Garstyciuks's Avatar
    Join Date
    Jan 2006
    Posts
    152
    Quote Originally Posted by aprentice
    I started out with a DOS programming book for C. I didn't have to focus on windows specific code so I was able to pick up C quicker. I'd recommend a C programming book for DOS first if thats the language your interested in learning, it seemed a lot easier for me at least.
    Hmm, I learned C++ after messing a lot with OpenGL at NeHe site The windows programming part came while programming my Chip8 emulator. I did some DOS programming, but in assembly.

  7. #7
    Persona User xneoangel's Avatar
    Join Date
    Aug 2005
    Location
    Tamriel
    Posts
    442
    Quote Originally Posted by Toasty
    In essence, it's a way to virtually copy code into our source file without making the source file huge in the process, which makes code a lot more manageable. It's also handy when you want to use the same code in many different source files, which will be important in bigger programs. The reason the tutorial told you to include that file is because it contains the definition for cout (short for "console out", BTW), which you will use to print text to the console.
    Thanks now i got it.
    "Mama we all go to hell, it's really quite pleasant except for the smell"

  8. #8
    ????????????????????????? Doomulation's Avatar
    Join Date
    Nov 2001
    Location
    ????????????????
    Posts
    8,780
    C and C++ is very low level, thus it is generally not a good idea to start with a high level language like VB IMO, because you'll be all confused later.
    Anyway, preprocessor is a co-compiler you might say that parses your source files before the compiler and does its work. There are a lot of preprocessor commands available, arguably the most used is the #include which, as explained, includes the contents of a file into the position where that is.

    A good way would be to get a small taste for the language through console-based programs. Then, you would logically move up to Windows-based apps. Howver, Windows inner workings and its API is not easy. But it important to understand it even if you are using Frameworks such as MFC, ATL or WTL.

    Use a tutorial, do it. Find another one, do it. And when you get stuck--ask. That is the way to learn. Now good luck.
    Atashi wa juu-yon-sai no onna no ko! Atashi no namae wa Miizuki. Yurushiku ne!
    Nani? Atashi o shinjirimasen desu ka? Baka!
    "You're all doomed! Doomed, I say! Hehe... are we approaching the end of the world?"

    shikata ga kaite aru - "the instructions are written above"
    Need to download GoodN64 or instructions to use it? Need to check if it's a good or bad rom?
    Download: Glide64 | Hacktarux's wrapper

  9. #9
    Persona User xneoangel's Avatar
    Join Date
    Aug 2005
    Location
    Tamriel
    Posts
    442
    Thanks now i understand what is a preprocessor.
    I'll take your advice i'm gonna do the tutorials and ask if i get stuck...
    The nice people here at emutalk are always great help.
    Last edited by xneoangel; September 19th, 2006 at 17:26.
    "Mama we all go to hell, it's really quite pleasant except for the smell"

  10. #10
    Banned Iconoclast's Avatar
    Join Date
    Aug 2006
    Location
    A rainbow cemetery
    Posts
    862
    Yes! For once, I can learn this language because I can finally install the thing. Hard to install on a limited account until you gave me that link.

    I'm new to C, as well, but I DO know ActionScript, up to Flash Player 6 in scripting complexity and some AS 2.0. I know a little HTML and even more DOS. I use DOS batch files to instantly start N64 games in Project64 and stuff, and I also use DOS when my PC shuts down at bedtime (a feature my parents installed), as I can't use Windows after 10 PM, but I can still use DOS even on Windows XP in a bootable floppy disk. That is why I like DOS emulators.

    I also know FEN, but that's a chess setup 'programming' (not quite) language, so screw that.

Page 1 of 13 12311 ... LastLast

Similar Threads

  1. Starting with Emu programming
    By Moshroum in forum Programming
    Replies: 18
    Last Post: September 30th, 2006, 20:55
  2. Graphics Programming Help/Suggestions
    By TJA in forum Programming
    Replies: 1
    Last Post: October 5th, 2005, 08:31
  3. Emu programming help
    By frostyraver in forum Programming
    Replies: 3
    Last Post: February 24th, 2005, 05:56
  4. Fundamentals of emu programming
    By Kethinov in forum Programming
    Replies: 7
    Last Post: August 28th, 2003, 00:23
  5. Programming Linux Games Book available online.
    By zero0w in forum Programming
    Replies: 1
    Last Post: October 22nd, 2002, 01:02

Posting Permissions

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