Results 1 to 11 of 11

Thread: The power of C

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2000
    Location
    Forest
    Posts
    545

    The power of C

    I am mainly a VB programmer and a side touch of web.

    Many people have told me to learn C. Can someone in here tell me the basic power of C, C++, VC++?

    One advantage I see from C is that it can create standalone executable. But can C be use to manipulate database?

    If you can educated me a little in this area, it would be fantastic.

    Hawk
    Bird of Prey

    Mr. Bald Eagle.
    [img][/img]

  2. #2
    Addicted Member HairyDave's Avatar
    Join Date
    Aug 2002
    Location
    Er...I can't remember.
    Posts
    196
    You can do pretty much anything with the use of C or C++. I'm currently writing an application at work that interacts with a MS SQL database, so thats not a problem.

    The power of C/C++ is that it works at a lower level than VB (feel free to correct me anyone). VB is abstracted to a far higher level and therefore you are limited by the abstractions of the language. There is also a big speed benefit due to the lower level of abstraction.

    A bit about C, C++, VC++.

    C is what I learned first. It is procedural, and doesn't support object orientation (beyond simple storage structures). This does not mean it is not as good, because everything you can do with an object you can do in C the 'hard' way.

    C++ is an extension of C. It supports objects and classes and can do lots of exciting things.

    VC++ is the MS IDE and compiler. It includes most of the stuff that the C++ standards require - different versions of VC++ have different things.

    This is a quick overview. I'm certain that theres lots of things I haven't said, and I'm sure Parksie or someone will expand upon what I've said.

    HD

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    No, you've covered the ground pretty good. Should suffice to answer the question.

    You might add that C++ support "generic programming" but I don't think this helps Hawk in any way.

    One thing to add: VB is a proprietary language of Microsoft while C and C++ are standardized languages. VB apps will only run in windows while you can write C and C++ apps so that they run on windows, UNIX, Mac and every system where there is a compiler for it (for C this means about every computer system there is).
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    C doesn't even necessarily need to run on a computer as such, it can be used within an embedded system.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  5. #5
    Addicted Member HairyDave's Avatar
    Join Date
    Aug 2002
    Location
    Er...I can't remember.
    Posts
    196
    Forgot about that. Ahhh, PIC programming - nice.

    HD

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2000
    Location
    Forest
    Posts
    545
    Thanks everyone and especially to you HairyDave.

    Lately I have been wanting to learn a new language. I find VB to be great and all but it does has its limitations. For instance, even a small program needs to be compile into a setup program.

    I am fascinated in creating standalone exe such as Metapad or Wizmo written in Assembly. Most of the time, when I write little programs for the network admin, I really hate making a setup program for such a small gadget.

    Anyway, I know C, Delphi and Assembly are the languages that can create standalone exe. If you recommend me to learn a new language, what should that language be? If it is C, should I go into VC++ because I have Microsoft Visual Studio. Can VC++ make standalone exe?

    One more thing, I learned QBasic first and then proceeded to Visual Basic. Can regular C compare in the same manner to VC++?

    Here is a program that someone wrote in C, I think. This is the type of stuff I want to learn how to create.

    http://liquidninja.com/metapad/

    Thanks again for your time!

    Hawk
    Bird of Prey

    Mr. Bald Eagle.
    [img][/img]

  7. #7
    Addicted Member HairyDave's Avatar
    Join Date
    Aug 2002
    Location
    Er...I can't remember.
    Posts
    196
    I can't tell you how QBasic and VB correlate to C and C++. But remember, VC++ is just a compiler and IDE for C++. There are many others, Borland C++, GCC are the most well known.

    What you want to learn will depend on what you want to do. Personally I learned to program in C first. Because of this my C++ code tends to be a bit of a C/C++ mash - urgh.

    You can write C programs in VC++ as well as C++ programs. If you have VC++ then you are probably better off using it. However, it doesn't support some of the C++ standards as well as GCC I believe. In VC++ 6 (which is what I have) templating is not too good.

    I can't really recommend a language to learn, but as C is probably going to die relatively soon, C++ may be the way to go.

    Whatever you decide, it'll be a steep learning curve as C/C++ are nothing like VB in the way they do things - you are at a lower level. This tends to shock most people who have done VB, but there are many benefits.

    Hope this helps.

    HD

  8. #8
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    You can't compare the correlation of QBasic and VB to C/C++ and VC++.

    VB introduced a few major extensions to the Basic language. Visual Basic is a language of its own. VC++ often offers a few non-standard keywords but those are relatively irrelevant. It doesn't define a new language.

    You can write standalone apps in VC++, because it is a C/C++ compiler.

    I recommend you don't learn C but go directly for C++, your coding style will benefit from it.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  9. #9
    Junior Member
    Join Date
    Oct 2002
    Location
    MI
    Posts
    23
    It's my understanding that C is typically faster than C++, but harder to use. C is better for drivers/OS stuff, and C++ is better for application development.

  10. #10
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    C is a little faster, but nearly unnoticable so if you structure your code well in C++. And thanks to inline functions C++ code can even be faster than C code, though larger.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  11. #11
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    For raw systems programming, C's minimalist approach wins out nearly all the time. The simplicity of the function calls, and the fact that the compiler doesn't perform much in the way of "magic" like C++ needs, helps keep sizes down.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

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



Click Here to Expand Forum to Full Width