So how hard is programming?

This is a discussion on So how hard is programming? within the C++ Programming forums, part of the General Programming Boards category; As stated in another thread of mine, I'll be starting programming this fall. I have no experience at all and ...

  1. #1
    Registered User Fool's Avatar
    Join Date
    Aug 2001
    Posts
    335

    So how hard is programming?

    As stated in another thread of mine, I'll be starting programming this fall. I have no experience at all and I'm wondering how difficult it really is? Could somebody post a short program (IE: Hello World!) and show what each line means? Also an exe of the program would be great too so I know what it looks like when finished. Thanks for any replies!

    -Fool

  2. #2
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    Simple C Hello World:
    Code:
    #include <stdio.h>
    #include <conio.h>
    
    /* This is a comment */
    
    int main(void)
    {
        printf("Hello World!");
        getch();
        return 0;
    }
    The first 2 lines tell the compiler to include header files so functions can be carried out. stdio.h is needed for printf. conio.h is needed for getch.

    The next line is a comment - anything in between /* */ is ignored by the compiler and can be used to make code easier to maintain, or just give information.

    int main(void) is the first function that is started whenever the program is run. The thing after it says everything between { } is part of the main function.

    printf("Hello World!"); prints Hello World! to the console window. Note the semicolon after the statement.

    getch(); pauses the program until the user presses enter.

    return 0; gives the main function a value of 0 after it's run. You need this line because main is declared as an integer. Some of this is probably confusing, but it'll make sense soon, I promise.

  3. #3
    Registered User Fool's Avatar
    Join Date
    Aug 2001
    Posts
    335
    Thanks so much for that. It wasn't hard to follow at all. Funny thing is, some of that is kind of like programming into calc (TI-85 to be exact). I got kind of bored in math classes in high school so I starting playing around with it.

    Anybody have any working exes of Hello World? You could just email it to me if you'd like. Fool1515@mediaone.net. Thanks!

    -Fool

  4. #4
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    Yeah, once you get past syntax, most programming languages are quite similar. TI-85 programming is closer to BASIC, actually.

    The hardest part of learning to program is thinking logically. Once you get past that, you're golden!
    Attached Files Attached Files

  5. #5
    Registered User Fool's Avatar
    Join Date
    Aug 2001
    Posts
    335
    Originally posted by Govtcheez
    The hardest part of learning to program is thinking logically.
    That's the only way I can think. This should be easier for me than I thought.

    -Fool

  6. #6
    aurė entuluva! mithrandir's Avatar
    Join Date
    Aug 2001
    Posts
    1,209
    Logic and syntax are really going to be your biggest obstacles - working out what is being done, and how to read your code and understand what it means.

    Here's a tip - never be afraid to ask for help - even if you think it is a stupid question, just ask - its the only way you'll learn.

    Best of luck

  7. #7
    Registered User Fool's Avatar
    Join Date
    Aug 2001
    Posts
    335
    For some reason I can't get the Zip file to work. Maybe it's the crap PC I'm on at work. I'll try it when I get home.

    -Fool

  8. #8
    Registered User Fool's Avatar
    Join Date
    Aug 2001
    Posts
    335
    Originally posted by [stealth]
    Here's a tip - never be afraid to ask for help - even if you think it is a stupid question, just ask - its the only way you'll learn.
    Oh don't you worry, I'm sure this board will be my new best friend come second semester

    -Fool

  9. #9
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    You're right - the zip file appears to be empty...

    Let's try again, then.

    For the record, the zip's not empty on my computer - just when I download it from the site.

    Nope, nothin'... Little help, somebody?
    Attached Files Attached Files

  10. #10
    aurė entuluva! mithrandir's Avatar
    Join Date
    Aug 2001
    Posts
    1,209
    See if this zip works...
    Attached Files Attached Files

  11. #11
    aurė entuluva! mithrandir's Avatar
    Join Date
    Aug 2001
    Posts
    1,209
    Hmmm...same problem...the file is here on my HD, but when I d/l it, it's empty.

  12. #12
    Registered User Fool's Avatar
    Join Date
    Aug 2001
    Posts
    335
    Maybe a board problem.

    -Fool

  13. #13
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    Maybe a board problem.
    Must be - other people have been having the same problem...

    On the other hand, empty files are so much quicker to d/l!

  14. #14
    Registered User Fool's Avatar
    Join Date
    Aug 2001
    Posts
    335
    Could you just email it to me?

    -Fool

  15. #15
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    how easy or hard is programming?

    lol how long is a piece of string?

    programming varies from reasonably simple to downright almost impossible depending on exactly what you are trying to achieve.

    One more word of advice for you.... NEVER EVER ask for .exe files to be emailed to you unless you are absolutely sure of what they are. You would be better asking for the .cpp files instead and compiling it yourself.

    for instance someone could send you something very nasty under a totally inocuous filename and if you were to open the attatchment your name would be very true...lol
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

Page 1 of 3 123 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Extracting data from a laptop hard drive
    By DavidP in forum Tech Board
    Replies: 6
    Last Post: 06-13-2009, 07:02 AM
  2. Detect SCSI Hard Drive Serial Number
    By mercury529 in forum Windows Programming
    Replies: 3
    Last Post: 10-17-2006, 06:23 PM
  3. Replies: 2
    Last Post: 07-06-2005, 07:11 PM
  4. Trinary Hard Drive
    By nickname_changed in forum Tech Board
    Replies: 14
    Last Post: 05-13-2005, 10:01 AM
  5. hard drive problems continually increasing
    By DavidP in forum Tech Board
    Replies: 5
    Last Post: 11-21-2002, 09:48 PM

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