|
-
Dec 18th, 2002, 01:55 AM
#1
Thread Starter
Fanatic Member
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]
-
Dec 18th, 2002, 04:33 AM
#2
Addicted Member
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
-
Dec 18th, 2002, 08:46 AM
#3
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.
-
Dec 18th, 2002, 08:55 AM
#4
Monday Morning Lunatic
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
-
Dec 18th, 2002, 09:01 AM
#5
Addicted Member
Forgot about that. Ahhh, PIC programming - nice.
HD
-
Dec 18th, 2002, 09:20 AM
#6
Thread Starter
Fanatic Member
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]
-
Dec 18th, 2002, 09:29 AM
#7
Addicted Member
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
-
Dec 18th, 2002, 09:53 AM
#8
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.
-
Dec 19th, 2002, 02:55 PM
#9
Junior Member
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.
-
Dec 20th, 2002, 06:34 AM
#10
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.
-
Dec 20th, 2002, 07:02 AM
#11
Monday Morning Lunatic
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|