473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Getting back into C/C++, Some Questions.

Rabbit
12,516 Expert Mod 8TB
So I first learned C++ about 3-4 years ago in school. I took C a year before that.
The last time I did anything in C++ was about 2-3 years ago.

Lately I've felt that I should get back into it. So, I have a bunch of questions.

1) Why C? Or why C++? I hear that C creates smaller, more efficient programs because it is more specific? Any truth to that?

2) I'm looking for a good compiler or IDE. I'm using Windows XP. It doesn't have to be free, I'm not adversive to spending some cash. Is Microsoft's Visual Studio any good?

3) What's all this .NET stuff? I was reading up on Visual Studio and I read something along the lines of: Programs compiled into MSIL can be executed only on platforms which have an implementation of CLI.

4) Eventually I want to create Windows applications. Could someone point me to a resource for beginners? Note that I have never done anything like that so I'm completely new to developing for Windows.
Apr 3 '07 #1
8 1457
sicarie
4,677 Expert Mod 4TB
So I first learned C++ about 3-4 years ago in school. I took C a year before that.
The last time I did anything in C++ was about 2-3 years ago.

Lately I've felt that I should get back into it. So, I have a bunch of questions.

1) Why C? Or why C++? I hear that C creates smaller, more efficient programs because it is more specific? Any truth to that?
Yeah, C and C++ let you control memory and the individual implementations.... well, I should say require you to control those... which allows greater control over what happens. This is dangerous in that not everyone will pay attention to memory management, or will use shortcuts that have unexpected consequences.
2) I'm looking for a good compiler or IDE. I'm using Windows XP. It doesn't have to be free, I'm not adversive to spending some cash. Is Microsoft's Visual Studio any good?
It's supposed to be pretty good. Personally, I learned initially on Linux, so I'm a GCC person myself, but it might be more difficult to start with (I haven't used the Windows version - sorry!). There's actually a pretty neat tool that they released for free (though I don't know the release conditions - I would definitely recommend looking into it before you start really developing on it - M$ almost definitely has a "you cannot create corporate binaries with this" license, but for just messing around it's pretty cool - their Visual C++.

3) What's all this .NET stuff? I was reading up on Visual Studio and I read something along the lines of: Programs compiled into MSIL can be executed only on platforms which have an implementation of CLI.
M$'s answer to Java and the JVM. That's pretty much all I know about it... sorry!
4) Eventually I want to create Windows applications. Could someone point me to a resource for beginners? Note that I have never done anything like that so I'm completely new to developing for Windows.
I'd recommend looking into Win32 API.

This is mostly Windows-centric, so that's the extent of my knowledge, but I'm sure some of the other guys on here can throw in a few better resources.
Apr 3 '07 #2
Ganon11
3,652 Expert 2GB
For an IDE/Compiler, I'll always suggest Bloodshed Dev C++. It's what I use - simple, yet accomodating.
Apr 3 '07 #3
Banfa
9,065 Expert Mod 8TB
The advantage of C over C++ is that you have much tighter control of memory allocation (no creation of temporary large objects on the heap) so it is better if you are developing in a constricted (low memory) environment.

For Windows programming 1 is s good as the other and using C++ lets you use various class libraries like MFC for instance.
Apr 4 '07 #4
Rabbit
12,516 Expert Mod 8TB
It's supposed to be pretty good. Personally, I learned initially on Linux, so I'm a GCC person myself, but it might be more difficult to start with (I haven't used the Windows version - sorry!). There's actually a pretty neat tool that they released for free (though I don't know the release conditions - I would definitely recommend looking into it before you start really developing on it - M$ almost definitely has a "you cannot create corporate binaries with this" license, but for just messing around it's pretty cool - their Visual C++.
I initially learned on Linux as well. But it was at school and I don't have Linux on my computer.

For an IDE/Compiler, I'll always suggest Bloodshed Dev C++. It's what I use - simple, yet accomodating.
Looks promising, I'll check it out along with Microsoft's free version.

The advantage of C over C++ is that you have much tighter control of memory allocation (no creation of temporary large objects on the heap) so it is better if you are developing in a constricted (low memory) environment.

For Windows programming 1 is s good as the other and using C++ lets you use various class libraries like MFC for instance.
Does this also mean it's faster? And how noticeable is the difference? What's MFC?

So, where's a good place to start learning to use the Win32 API?
Apr 4 '07 #5
Banfa
9,065 Expert Mod 8TB
Does this also mean it's faster? And how noticeable is the difference?
No, except that in my experience C++ programmers tend to be a little sloppy and seem to think nothing of copying buffers of data around rather than passing pointers which again slows things down in a constricted environment. All other things being equal I would expect C and C++ to perform at about the same speed.

What's MFC?
So, where's a good place to start learning to use the Win32 API?
Microsoft Foundation Class library, the C++ wrapper classes that MS put round the WIN32 API (plus a few others) to make it "easier" to call. It is easier in some ways but basically is its own brand of black magic. It is also not terribly efficient but then a PC is hardly a constricted environment so this isn't necessarily a problem.

Try starting here for MFC and WIN32 API.

Actual WIN32 API programming is a bit of a thing of the past most people plumping for MFC or .NET instead.
Apr 4 '07 #6
Rabbit
12,516 Expert Mod 8TB
No, except that in my experience C++ programmers tend to be a little sloppy and seem to think nothing of copying buffers of data around rather than passing pointers which again slows things down in a constricted environment. All other things being equal I would expect C and C++ to perform at about the same speed.

Microsoft Foundation Class library, the C++ wrapper classes that MS put round the WIN32 API (plus a few others) to make it "easier" to call. It is easier in some ways but basically is its own brand of black magic. It is also not terribly efficient but then a PC is hardly a constricted environment so this isn't necessarily a problem.

Try starting here for MFC and WIN32 API.

Actual WIN32 API programming is a bit of a thing of the past most people plumping for MFC or .NET instead.
Thanks for the info. Now if I could get them to install the compiler at work for me I'll actually be able to devote some time to this.
Apr 4 '07 #7
nmadct
83 Expert
Good questions! And the responders have avoided starting any holy wars, so that's good too, hehe.

Generally the domain of your project will determine your choice of C vs. C++ (e.g. C for network servers or hardware drivers, C++ for games or GUIs). C is more efficient, I'm pretty sure that even if you compile the exact same program with a C compiler and a C++ compiler, the C version will run a bit faster. On the other hand, the C++ object-oriented features are just essential for certain types of programs.

Personally I prefer working with C rather than C++ because the language is much simpler. There's something about the complexity of C++ that seems to drive many programmers to abuse its complex features, even though many of them have costs in terms of performance and/or ease of debugging. (Examples: RTTI, operator overloading.) On the other hand, I guess C programmers tend to abuse preprocessor macros! To be honest, C and C++ both have serious flaws due to their age and the need for backward compatibility.

I second the motion for DevC++, that's what I use for Windows programming in C/C++. Another option is Eclipse, I haven't used it for C/C++ but the website says it's supported, I think. I use MS Visual Studio 2005 at work (for C# and VB.NET, not C++) and it has many nice features but also some awful headaches. (It's a little buggy!) A cross-platform, open-source alternative to MFC is wxWidgets (www.wxwidgets.org), a C++ framework that uses the native windowing system on whatever platform you're using (Windows, Mac, Linux, embedded systems). DevC++ has a version with built-in support for wxWidgets.

.NET is, as another poster said, a framework similar to the Java virtual machine. C#, VB.NET, the .NET version of C++, and some other languages compile to .NET bytecode. I program in C# and VB.NET on the job. C# is a nice language, very similar to Java but with many uesful enhancements. The main drawback is that it ties you to Microsoft. (In theory it's portable but in practice this is questionable, especially in the long-term.) Performance is decent, I'd recommend it for GUI programming over C++/MFC unless you really need it to run really fast. The Visual Studio GUI editor for C# is probably the best GUI-building tool on the market.
Apr 4 '07 #8
Rabbit
12,516 Expert Mod 8TB
Thanks! I think I've settled on using DevC++. For now I'm just skimming through the tutorials at CProgramming to get me back in the game.
Apr 4 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

303
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b....
1
by: Ian Davies | last post by:
Hello In a php file I have a drop down list with index numbers in whos default value is feed into an sql query that filters records from my database and displays them in an html table. Trouble...
1
by: farseer | last post by:
Hi, I created a new resouce ("app.resx") in my project and added an icon to this resource with name "IL_ICON". I would like to use this resource in some unmanaged code, in particular, with the...
3
by: Richard | last post by:
Hey there, I have a textbox and a listbox. When a user types a number in the textbox, I want to get all the records from a MS Access DB but without reloading the page. I now have something...
3
by: shalender verma | last post by:
I am using VB6. I want to get the text in the tittle bar of any opened window of other app. such as word,excel or any app. appering at the back of my vb form. What i am doing is i created a small...
2
by: Matt | last post by:
Hi, I'm sure this has been asked before, but my searches haven't come up with an example. I'm writing a generic trigger function called from different tables in plpgsql that needs to get the...
0
by: Jason | last post by:
I am attempting to have an asp page call a batch file. I had it working, I was high on life and then I decided to log off the server. Once I did, the code would no longer work. When I logged back...
6
by: hemant.singh | last post by:
Hi all, I am trying to get a way by which I'll know exactly when user goes out of my site by clicking on close button in browser, So that w/e user click close button in browser, I can send a...
10
by: Paul H | last post by:
I am trying to get the spec for a database. The trouble is the client frequently blurts out industry jargon, speaks insanely quickly and is easily sidetracked. They are currently using around 30...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.