Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Learning "Microsoft Visual C++ 2005 Express Edition" 2

Status
Not open for further replies.

Pleonasm

Technical User
May 20, 2004
121
CA
I have significant C language programming experience (although a bit rusty), but haven't specifically used Microsoft's Visual C++ 2005 Express Edition. What recommendations do you have for the home hobbyist for self-learning of the Visual C++ Integrated Development Environment (IDE) and getting started with building Windows applications?

Thank you for your assistance.
 
Just one point:

Nearly every book you buy will spend a lot of pages describing how MFC is used to create a windows program. This is a great pity because MFC is not included in the express edition of visual C++. I have a sneaky suspicion the books work that way because the authors know more classic C++ than CLR-C++.

If you're learning using the express edition, forget MFC, forget Malloc and friends, you may as well go the whole hog and commit to the common language runtime (CLR) approach, and the garbage collected heap (all the stuff that begins gc_). This was clearly Microsoft's intention in providing the Express edition (for free!) and it's no fun swimming upstream.

In any case, if you're anything like me, the number of free-time hours wasted in tracking memory leaks is just too large for comfort, and frankly, pointers that dispose of their own contents automatically when you're done with them seem too good to be true.

(No doubt plenty of C++ purists will argue they ARE too good to be true.)
 
lionelhill said:
forget Malloc and friends
You can't use MFC with 2005 express, but malloc() & friends work fine for me:
Code:
#include <iostream>
#include <memory.h>

using namespace std;

class CNumPair
{
public:
	friend int Sum( CNumPair& nums );
	CNumPair( int a, int b )
	: m_A( a ), m_B( b ) {}

private:
	int m_A;
	int m_B;
};

int Sum( CNumPair& nums )
{
	return nums.m_A + nums.m_B;
}

int main()
{
	char* pszStr = (char*)malloc( 80 );
	free( pszStr );

	CNumPair nums( 2, 3 );
	cout << "The sum = " << Sum( nums ) << endl;

	return 0;
}
 
Lionelhill, are you recommended that I purchase a license for the full copy of Visual Studio 2005 rather than use the Express Edition? Are you saying that the Express Edition has too many defects ("bugs") to be worthwhile?
 
Question, do you have an include file somewhere called "windows.h"?

If so, I recommend the Petzold series, "Programming Windows." You should be able to get either the 95 or 98 book off eBay for $20 or so. Either will work with any new Windows operating system.

(Of course, I also own Programming Windows 3.1 and Programing OS/2, but I'm a mutant...)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top