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!

Frustrated C++ newbie!

Status
Not open for further replies.

CondorMan

Technical User
Jan 23, 2005
211
GB
Hi everyone

I have very little experience of programming and have decided to learn C++. I downloaded Dev-C++ and, whilst I can compile simple code such as "Hello World!", I've had no joy in getting it to debug and step through the code. I don't need to do this for such simple code, but I will when I decide to create my own.

I'm looking into other compilers - Borland, MSVC Express (I understand that this is a free download) or Visual Studio Standard (I understand that this has MCVC++). I am apprehensive about Express as I've seen several posts about not being able to run some .exe files on an XP PC that were created on a different XP PC because something isn't installed on the second PC.

What about Visual Studio/MSVC++? Presumable it's possible to step through code and debug it? Is it also possible to create an .exe on an XP PC, transfer it to another XP PC and get it to run completely normally, without having to install or download anything to the second PC to go with it?

I'm determined to get to grips with C++ and if that means buying Visual Studio (at a cost of around £200), I'll have to do it. I just need the reassurance that it won't be money wasted!

Thanks for your time.
 
I'm not sure what you mean about not being able to run a program compiled on one XP PC on another PC? I've never heard anything about that.
The only thing I can think of that would cause that is if the program was built as a .NET application and the other PC didn't have the .NET framework installed.

Yes, you can run and debug programs with Visual Studio (and Express).
 
Yeah, I know what you're talking about with Express.

You can build & compile programs just fine, but they're really only for debugging purposes. If you want to distribute programs, Microsoft wants you to buy their software. And they do that by compiling the program with a requirement oddball file that only comes with VC++ (so only other developers could use it).

SO, you write it in Express, and re-build it in Dev-C++ :).

I personally like Dev-C++; that's what I'd recommend.
 
Thank you for each of your comments.

I had been recommended strongly to use Dev-C++ but, as I said, I just can't get it to debug or step through the code. I've set the compiler and project options to create debugging information and also removed the optimizations.

It's an interesting thought to write code in Express and rebuild it in Dev-C++. That way I get everything for free! The only concern that I have is regarding "dialects". What I mean is that some things are not available to all compilers (again, it's something that I've picked up from reading posts, rather than personal experience). I may have some code which works perfectly well in Express but when I recompile with Dev-C++, it generates and error so I'd have to start the debugging scenario all over again with Dev-C++ (if I could do that with my system!).

See why I'm frustrated?
 
No, you can write programs with Express that work fine on other PCs. Yes, they will need .NET 2.0, but it's a free download if you haven't got it, and it's a part of a typical windows install for the future anyway. The situation is analogous to DirectX.

Express won't write native win32 programs apart from console applications. For .NET forms applications (which to the user look just like native windows applications) it contains all you need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top