|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
C or C++
Hi,
I am a first year uni student. I can Program in Perl and PHP currently, however I would like to move into the area of 1) Developing windows applications in C or C++. 2) Developing CGI applications/Apache modules in C or C++. I have not started to learn this languages yet, however I am not sure which one I should learn. My understanding is that they are both similar, but C++ allows object orientated programming. Is C a good language to learn for the objectives I wrote above, or is C++ more suited to this? Any advice and/or reasons would be greatly appreciated. Thanks in advance.
__________________
Cheers, Michael Bray |
|
#2
|
|||
|
|||
|
Learn C first. As everything that you know from C will be able to be used in C++. Have some experience with Java too, so learning C++'s OO will be an easier experience.
|
|
#3
|
||||
|
||||
|
1) C++. Once you learn C++, you can use MFC to create windows apps. You can also use straight C to interact with the Windows API, but that's overkill. But as said before, you should learn C first. C++ is a superset of C.
2) Sorry, never done any of this.
__________________
Jon Sagara "Me fail English? That's unpossible!" |
|
#4
|
|||
|
|||
|
2) CGI: whatever language you want, so long as it can do input and output. Both C and C++ are OK, although I find C++ better for this (never done it myself, though). It's the difference between
Code:
printf( "Content-Type: text/html\n\n<html>..." ); and Code:
cout << "Content-Type: text/html" << endl << endl << "<html>..."; (I'm not sure if that's correct at all.) Apache mods: they seem to be C, but you'll want to take a look at the docs.
__________________
PHP manual | MySQL manual | Apache docs | Linux Documentation Project | Free Software Foundation Smart Questions HOWTO | PHP security | PHP FAQ | Posting HOWTO Wikipedia | English dictionary | Google | News | RFCs Thus Spoke Zarathustra | A Skeptic's Guide to Christianity | Project Gutenberg | Skeptic's Annotated Bible ParEcon | Marxists Internet Archive | The Memory Hole | Landover Baptist | DHMO Research Universal Declaration of Human Rights | UN Charter | Geneva Conventions Sinfest | Chopping Block | Filthy Lies | Bob the Angry Flower | How to Shoot Yourself In the Foot |
|
#5
|
|||
|
|||
|
Thanks for your advice. Just another quick question related to this topic, is C# a better pathway to take then C++ is after I have got my head around C?
I have to admit, C# seems to have come out of no where and now all of a sudden I am seeing it alot. I have no idea how it differs from other variants, so any info on that would be greatly appreciated as well. |
|
#6
|
|||
|
|||
|
Not really better, C# is another language. One that may be more interesting for Basic programmers.
Definitely learn C++. It won't die out for at least a decade. |
|
#7
|
||||
|
||||
|
If performance matters, then go with C++. C# is slower.
|
|
#8
|
||||
|
||||
|
You should learn C first. It will build a strong foundation for the C++ along with other languages that you may learn later on.
1)If you are going to be doing only windows os operating system then learning C++ and MFC is the way to go. Especially if you are going to be using such things as database grids which is most definately best done with objects. The downside to MFC is that it can be overly complex at times and you can only use it on windoze. 2)This is just a prefence to me. I really haven't found many cases where C++ was needed over C when doing CGI applications. If you don't need C++ it is sometimes easier to use C. It compiles faster and uses less code (for most cases). jonsagara: How is using the windows api overkill? It is definately good practice to know how to use them. Even if there are covered by MFC in C++, for years all that you could do was use the API and it is a good thing to know how to use them, even if it is something just as simple as using sleep. This helps more now when doing VB. |
|
#9
|
|||
|
|||
|
Onslaught: using the API for drawing complete windows and making apps is overkill. Of course, using an API function here and there to do stuff is not. After all, what are the reference books and the MSDN for? If you need to do something below MFC level, you just look it up when needed.
|
|
#10
|
||||
|
||||
|
Ok, I guess I missread his post. I wasn't talking about using the api just for writting a window in C++, that is pointless when there are better tools for the job. It just sounded to me that he was saying there was no need to know the api, when they still have plenty of purpose even with the tools that MFC provides.
|
|
#11
|
||||
|
||||
|
Onslaught:
I should have been more clear. Like realnowhereman said, I feel it is a tremendous waste to try to build Windows applications from scratch when libraries like MFC and WTL are available. I also agree that understanding the underlying API really helps you to understand MFC. Like any aspect of programming, each tool has its use. It's up to you and me to figure out the appropriate time to use each tool. ![]() |
|
#12
|
||||
|
||||
|
Now that statement I totaly agree with.
Now I have a question? Has anyone tried using wxWindows? I have started playing around with it a little for making cross-os applications. Wish it was a little more stable. |
|
#13
|
|||
|
|||
|
I haven't tried it, just would like to say that it looks imho ugly. Try GTK - it's quite easy (at least for those who can C (I can't)) and you can do cross-platform stuff with it.
|
|
#14
|
||||
|
||||
|
Thanks, I will have to check that out.
|
|
#15
|
||||
|
||||
|
Quote:
Quote:
__________________
Some people, when confronted with a problem, think “I know, I'll use regular expressions.” Now they have two problems. - Jamie Zawinski, in comp.lang.emacs |