Results 1 to 17 of 17

Thread: C Programming

  1. #1
    Gelatinous Cube's Avatar Ducenarius
    Join Date
    Mar 2005
    Location
    Eugene, Oregon
    Posts
    918

    Default

    Greetings! I need some help. I'm trying to learn the C Programming Language for a variety of reasons (the main one being that I'd like to someday design a game.. surprise..), but an not having a load of luck.

    My main concern right now is just finding a good tutorial on it. One tutorial said to download a compiler. Which I did. The only one I could find that made even one iota of sense to me on it's web-page without having too many foreign acronyms was one called "Miracle C", which looks pretty easy to use (I'm familiar with the logic of how C scripting is done, from having spent several years playing NWN and trying to dabble in it, but I don't know the specifics.). I need a tutorial that teaches you just how to bloody use C, and says it in plain english. Google searches are only making my head hurt. HELP THE CUBE.
    Cube: I want a sign from god, in special godly ink, proving his existence.
    Poets: What if you have to take it on Faith?
    Cube: Bah, no deal. That's like a crack-head asking for $5 on Credit.

  2. #2

    Default

    Try this site, it is somewhat easy to understand. I know the basics of C and C++.
    Capital is dead labor, which, vampire-like, lives only by sucking living labor, and lives the more, the more labor it sucks.




  3. #3
    Erik's Avatar Dux Limitis
    Join Date
    Aug 2004
    Location
    Amsterdam
    Posts
    15,653

    Default

    I have been programming in C for years but I have learned it at university, not (just) from the web.
    Do you have any other programming experience? or is this your first step into programming?

    When you said you needed a compiler I think you realy needed an IDE. (Micracle C also ships with an IDE)
    Compilers are programs that translate source code into computer code (.c files into .o files).
    An IDE (Integrated development environment) is software that combines everything you need to make your own programs (text editor, compilers, linker, project manager, etc. etc.)
    It's possible to program in C using just the windows notepad, a compiler and a linker but an IDE makes everything a lot more easy for you.

    Currently I use the Bloodshed Dev-C++ (http://www.bloodshed.net/) IDE and I realy like it.
    It's free, easy to use and (very important for game programming) has a lot of packages available for it.
    I recommend it over Miracle but you can stick with the Miracle IDE if you want.



  4. #4

    Default

    Go to library and loan a book. You will learn 10 times faster than if you'd just read tutorials from the net.

  5. #5
    Ardeur's Avatar Chattering in Chinese
    Join Date
    Apr 2005
    Location
    Illinois, USA
    Posts
    849

    Default

    C is a pretty slick language once you get it down. I'll echo the previous comments on the importance of having some good C books, and also state that you may want to check out some coding examples from like sourceforge.net or some place like that, that way you can download some functional code and see how it works.

    Good luck and happy coding!!

  6. #6
    smack's Avatar Complaints Department
    Join Date
    Mar 2005
    Location
    Asheville, North Carolina, USA
    Posts
    1,535

    Default

    I don't have any links handy Cube, but even years ago there were many great C++ tutorials online. The only thing I'd caution is to make sure you are learning actual C++ and not a "And after you learn our **** version of basic, you'll know C++ too!" kind of thing.

    C is not exactly the easiest language to learn first, but if you only learn one, C should be it!

    Good luck.

    In patronicum svb: Spartan
    Patronum celcum quo: teecee, Old Celt, SigniferOne
    If you dare: My Journal or If you care: The Price Tag

  7. #7

    Default

    try c++ for dummies it really helps

  8. #8
    Gelatinous Cube's Avatar Ducenarius
    Join Date
    Mar 2005
    Location
    Eugene, Oregon
    Posts
    918

    Default

    Thanks for all the links, they ought to come in handy some.
    Cube: I want a sign from god, in special godly ink, proving his existence.
    Poets: What if you have to take it on Faith?
    Cube: Bah, no deal. That's like a crack-head asking for $5 on Credit.

  9. #9
    krazykarl's Avatar Tech Monkey
    Join Date
    Jan 2005
    Location
    Hamilton, Ontario, Canada
    Posts
    766

    Default

    I use "C Primer Plus" for my C programming class, it was quite helpful, big blue 1000 page book, its not that expensive either (compaiered to some other books ive seen). FYI If you learn C first, moving to C++ will be very easy, as the major issue with C for me was that there is no String data type, you must use a char array instead.
    -There is no Overkill
    -Apathy causes the least amount of conflict with stupid people

    Check out my Guide to creating webpages
    Under the patronage of Incinerate_IV

  10. #10
    Gelatinous Cube's Avatar Ducenarius
    Join Date
    Mar 2005
    Location
    Eugene, Oregon
    Posts
    918

    Default

    Originally posted by krazykarl@May 10 2005, 12:02 PM
    I use "C Primer Plus" for my C programming class, it was quite helpful, big blue 1000 page book, its not that expensive either (compaiered to some other books ive seen). FYI If you learn C first, moving to C++ will be very easy, as the major issue with C for me was that there is no String data type, you must use a char array instead.
    Noted. A friend of mine might have some C books lying around somewhere. I'll have to bug him. :cool
    Cube: I want a sign from god, in special godly ink, proving his existence.
    Poets: What if you have to take it on Faith?
    Cube: Bah, no deal. That's like a crack-head asking for $5 on Credit.

  11. #11
    Erik's Avatar Dux Limitis
    Join Date
    Aug 2004
    Location
    Amsterdam
    Posts
    15,653

    Default

    Originally posted by krazykarl@May 10 2005, 01:02 PM
    I use "C Primer Plus" for my C programming class, it was quite helpful, big blue 1000 page book, its not that expensive either (compaiered to some other books ive seen). FYI If you learn C first, moving to C++ will be very easy, as the major issue with C for me was that there is no String data type, you must use a char array instead.
    Yes, and starting with ANSI C wil also help you get into Java and all the other languages that are based on C.
    I also think there are more beginner tutorials for C than for C++.



  12. #12
    Ardeur's Avatar Chattering in Chinese
    Join Date
    Apr 2005
    Location
    Illinois, USA
    Posts
    849

    Default

    I also think there are more beginner tutorials for C than for C++.
    True, most C++ and C# manuals I've read have been written under the assumption that the reader already has the basics down.

  13. #13
    Gelatinous Cube's Avatar Ducenarius
    Join Date
    Mar 2005
    Location
    Eugene, Oregon
    Posts
    918

    Default

    Alrighty, i'm getting the hang of C quite nicely so far. I've decided to start small, by making a game of Rock, Paper, Scissors. I've run into a problem, however: I can't quite figure out how to get C to generate random numbers. Since I'm trying to learn the langauge, I don't just need to know what to type, I need to know how to do this for other situations too. At the moment I just need to have the computer randomly decide between 1, 2, or 3.

    So, help me out here, explain all about Random numbers within C.
    Cube: I want a sign from god, in special godly ink, proving his existence.
    Poets: What if you have to take it on Faith?
    Cube: Bah, no deal. That's like a crack-head asking for $5 on Credit.

  14. #14
    smack's Avatar Complaints Department
    Join Date
    Mar 2005
    Location
    Asheville, North Carolina, USA
    Posts
    1,535

    Default

    Is Google outlawed where you are?

    If you want a personal tutor, I think there are free and paid programs for learning C online. Otherwise, I think you are getting extremly lazy. Questions like "How do I generate a random number?" have been asked and answered in every C tutorial since time immemorial. What is the point of going through this here when there are answers one click away?

    In patronicum svb: Spartan
    Patronum celcum quo: teecee, Old Celt, SigniferOne
    If you dare: My Journal or If you care: The Price Tag

  15. #15
    Erik's Avatar Dux Limitis
    Join Date
    Aug 2004
    Location
    Amsterdam
    Posts
    15,653

    Default

    Originally posted by Gelatinous Cube@May 11 2005, 12:44 AM
    Alrighty, i'm getting the hang of C quite nicely so far. I've decided to start small, by making a game of Rock, Paper, Scissors. I've run into a problem, however: I can't quite figure out how to get C to generate random numbers. Since I'm trying to learn the langauge, I don't just need to know what to type, I need to know how to do this for other situations too. At the moment I just need to have the computer randomly decide between 1, 2, or 3.

    So, help me out here, explain all about Random numbers within C.
    There is a function called rand() in stdlib.
    It returns a "random" int.

    There is however one problem: it isn't realy random, it calculates a number based on it's last number.
    Everytime you run your program you wil end up with the same "random" numbers.
    To solve this you must give it a random seed with srand(unsigned int seed).
    Sounds like a catch-22? Well, you can pass the current time as the "random".

    this should work:

    #include <stdlib.h>
    #include <time.h>

    int main(void){
    srand(time(NULL));
    printf("my random number is %d &#092;n",rand());

    return 0;
    }



  16. #16
    Gelatinous Cube's Avatar Ducenarius
    Join Date
    Mar 2005
    Location
    Eugene, Oregon
    Posts
    918

    Default

    Thanks, i&#39;ll give that a shot.

    And, smack, rest assured I looked around for it in tutorials first. It seems that, with the possible exception of howstuffworks.com, most people who write them have lost any grasp on plain english.
    Cube: I want a sign from god, in special godly ink, proving his existence.
    Poets: What if you have to take it on Faith?
    Cube: Bah, no deal. That&#39;s like a crack-head asking for &#036;5 on Credit.

  17. #17
    Erik's Avatar Dux Limitis
    Join Date
    Aug 2004
    Location
    Amsterdam
    Posts
    15,653

    Default

    Originally posted by Gelatinous Cube@May 11 2005, 12:02 PM
    Thanks, i&#39;ll give that a shot.

    And, smack, rest assured I looked around for it in tutorials first. It seems that, with the possible exception of howstuffworks.com, most people who write them have lost any grasp on plain english.
    prinf("What?&#092;nLost grasp on plain english?&#092;nWho? %s?&#092;n",&me); &#092;&#092;*tongue*

    No, I totally agree.
    I find that very anoying whenever I lean a new system.
    They always forget to give the most simple info you need get you started.
    Just remember that most computer "whizz-kids" have very poor social skills (this is not a cliche, I know them), and can&#39;t reflect to what it&#39;s like to know absolutely nothing about a subject.



Posting Permissions

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