• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

I'm overwhelmed by the C++

lyssword

Diamond Member
I started c++ a few weeks ago, this time got further than "hello world" 😀 (got a few books from the library). Now I see that programming is more complex than I ever imagined 😱 kudos to all programmers out there 😛

So far I've been doing simple tasks on console window using int main(). I recently struggled with converting inches to feet, but found out about modulus % now 🙂.
Right now I'm starting on functions (so far really simple ones, like show a string or add this or that number), and still having trouble with exactly how return types work 🙂. Well, now I'm having a little mental block, or perhaps I got too intimidated by looking at c++ source code made by decent programmers with 1000-3000+ lines 😱

My dream is to make a very simple game or a simulation in direct x, but it seems that I'm a long-long ways from being able to do it 😛

So, does anyone have any tips, good programming forum for beginners or anything like that?
Thanks 🙂


 
It doesn't sound like you got to pointers yet, but for a person new to programming, c++ probably isn't the best choice.

Check out C#, it's a lot easier to pick up. Some books I've been using myself include Programming in the Key of C# by Petzold and Learning C# 2005 by Liberty and MacDonald (O'Reilly publishing).

But regardless of the language, dont get too caught up in syntax. Syntax is important of course, but a good grasp of object oriented programming is much more important, and applies to pretty much all the 'mainstream' languages (c++, c#, vb, etc).

Also, Microsoft put up a whole website dedicated to new programmers. It's actually pretty good, you should definitely check it out. There's tracks for Windows, web. gaming and hardware development.

http://msdn.microsoft.com/vstudio/express/default.aspx

Good luck! 🙂
 
Cool, thx, I'll try c#. I already had studio vb, c#, c++ installed since they are all free : ), I'll check that forum too.
 
I have been working in C# for about 6 months and really like it. I plan on learning C++ next so I can develop applications for my PSP.
 
Several of my programming teachers recommend Bruce Eckels "Thinking in C/C++" for learning C. Plus it's a free book from his website. Sorry, don't have a link, just google for Bruce Eckel.
 
Hersay only.

I have been told that it is more diffucult to learn C++ after C# than it is going from C++ to C#
 
Whatever language you decide to do, try to stick with it and learn to become at least intermediate level with that particular language. That way you will be able to translate a lot of the syntactical stuff from one language to another since you already have a basic understanding of the concepts to derive/translate it to a different syntax. Most languages are similar, expecially the C/C++/Java/C# family. Also, read more of other people's code and write even more by yourself, the feedback from both ends will help you learn tremendously.
 
Originally posted by: Pwnbroker
Several of my programming teachers recommend Bruce Eckels "Thinking in C/C++" for learning C. Plus it's a free book from his website. Sorry, don't have a link, just google for Bruce Eckel.

Bruce Eckel

Wow! What a helpful site!

I'm also trying to come to grips with C programming. This should help me a lot.

Thanks!

 
If you really want to get a good understanding in programming I'd start with C or C++, before Java or C# (I don't know much about this, is it more like Java?). I started with Java and then moved into some C. It was hard for me to understand about pointers, setting aside memory, etc, because Java didn't have it or did it for you. I feel like C has actually taught me more about the basics of programming.
 
Originally posted by: lyssword
I started c++ a few weeks ago, this time got further than "hello world" 😀 (got a few books from the library). Now I see that programming is more complex than I ever imagined 😱 kudos to all programmers out there 😛

So far I've been doing simple tasks on console window using int main(). I recently struggled with converting inches to feet, but found out about modulus % now 🙂.
Right now I'm starting on functions (so far really simple ones, like show a string or add this or that number), and still having trouble with exactly how return types work 🙂. Well, now I'm having a little mental block, or perhaps I got too intimidated by looking at c++ source code made by decent programmers with 1000-3000+ lines 😱

My dream is to make a very simple game or a simulation in direct x, but it seems that I'm a long-long ways from being able to do it 😛

So, does anyone have any tips, good programming forum for beginners or anything like that?
Thanks 🙂

Get C++ Primer plus by Stephen Prata, that book will make C++ very clear to you. It's probably THE BEST book to take someone who knows nothing about C++ and make them feel comfortable with it. It doesn't assume you know anything about C or C++.

 
C++ is a bastard language. Not recommended to learn programming on as others have stated. Java or C# is a good start.
 
Originally posted by: EagleKeeper
Hersay only.

I have been told that it is more diffucult to learn C++ after C# than it is going from C++ to C#

That is probably because C++ is a more difficult language to master than C#, IMO.
 
Originally posted by: txrandom
If you really want to get a good understanding in programming I'd start with C or C++, before Java or C# (I don't know much about this, is it more like Java?). I started with Java and then moved into some C. It was hard for me to understand about pointers, setting aside memory, etc, because Java didn't have it or did it for you. I feel like C has actually taught me more about the basics of programming.

On the contrary, I'd argue that it is better to learn about pointer and manual memory allocation/deallocation *after* you have learned about other programming basics. C is definitely not a good language for a beginner.
 
Originally posted by: Chris
C++ is a bastard language. Not recommended to learn programming on as others have stated. Java or C# is a good start.

Haha, it certainly is a bastard, in the perjorative sense. It's probably also a bastard in the familial sense.

I'll chime in and agree with the general consensus: C++ is a tough place to start programming. When I began with it almost 20 years ago, I had been programming for almost ten years, first in BASIC, then later in Pascal and a little assembler. The advantage that gave me was considerable. I understood flow of control through a program, what a subroutine (and function) was and how to decompose a problem into a set of them. Perhaps more importantly, the work in assembler (largely writing obj modules for linking into Pascal programs) gave me a really good understanding of memory. Back then you pretty much had to have that to do anything. So when I grappled with pointers in C++ I got them fairly easily.

I still love the language, although I feel that the standardization process put it on a high-carb diet. If the intended platform is Windows, then to be honest I don't anyone needs to put themselves through this agony. Windows application developers will never again have to think about memory at an address level, any more than the average ricer today needs to know what to do with a carbeurator and a distributor cap. Those days are gone, and with Vista the high level interfaces to the system (i.e. .Net) are standard and built in. The object APIs provided will be the way that Windows apps are written, and only driver and utility developers will think about the nuts and bolts. This will be true for game development as well, on a somewhat slower timeline. Currently game developers still do a lot of pretty low-level development, and modern 3D titles are not written on .Net. Eventually they will be.

So for a beginning developer on the Windows platform, C# is my recommendation. On other platforms, Java, which in terms of abstraction is pretty much the same as C#.
 
So far I have programmed in machine code (IBM370), Assembler, pascal, basic, C, C++, java, Fortran and a few others that I have forgotten. I do most of my work in either C/C++ or Java. I personally think that either basic or java would be a good starting place but I have been out of the "learning to program" field for far too long. C and C++ can be far too difficult unless you know exactly what you are doing and if you do play with those stay away from pointers until you learn what you are doing with them since they can wreak havoc in some instances (esp if the OS doesn't know you aren't supposed to be playing outside your memory region).

kevin
 
Originally posted by: Markbnj
Originally posted by: Chris
C++ is a bastard language. Not recommended to learn programming on as others have stated. Java or C# is a good start.

Haha, it certainly is a bastard, in the perjorative sense. It's probably also a bastard in the familial sense.

I'll chime in and agree with the general consensus: C++ is a tough place to start programming. When I began with it almost 20 years ago, I had been programming for almost ten years, first in BASIC, then later in Pascal and a little assembler. The advantage that gave me was considerable. I understood flow of control through a program, what a subroutine (and function) was and how to decompose a problem into a set of them. Perhaps more importantly, the work in assembler (largely writing obj modules for linking into Pascal programs) gave me a really good understanding of memory. Back then you pretty much had to have that to do anything. So when I grappled with pointers in C++ I got them fairly easily.

I still love the language, although I feel that the standardization process put it on a high-carb diet. If the intended platform is Windows, then to be honest I don't anyone needs to put themselves through this agony. Windows application developers will never again have to think about memory at an address level, any more than the average ricer today needs to know what to do with a carbeurator and a distributor cap. Those days are gone, and with Vista the high level interfaces to the system (i.e. .Net) are standard and built in. The object APIs provided will be the way that Windows apps are written, and only driver and utility developers will think about the nuts and bolts. This will be true for game development as well, on a somewhat slower timeline. Currently game developers still do a lot of pretty low-level development, and modern 3D titles are not written on .Net. Eventually they will be.

So for a beginning developer on the Windows platform, C# is my recommendation. On other platforms, Java, which in terms of abstraction is pretty much the same as C#.

:thumbsup:

I basically agree here. If you want to write Windows apps, go with C# - for other platforms, or cross-platform apps, go with Java. Memory management should be abstracted away *unless* the programmer actually needs the ability to manipulate memory directly. For most high level apps, this really isn't necessary anymore.
 
Originally posted by: EagleKeeper
Hersay only.

I have been told that it is more diffucult to learn C++ after C# than it is going from C++ to C#

That's probably because C#/Java programmers sit there wondering why C++ programmers would ever put up with all the dangling pointers and random crashes caused by misuse of pointers and having to manually manage your memory 🙂

C++ is a bit harder to write well than Java/C#, so it makes sense it is quicker to go from hard->easy than easy->hard.
 
I started with VB .NET because that's what my school teaches as an introduction to programming and they continue with it in the intermediate class before teaching Java and C++ etc. I haven't worked in another language yet, but I found it very easy to pick up some basic programming concepts. I'm sure I've only scratched the surface, but I got as far as creating a UI for a database and building SQL queries to querey the database. I don't necessarily recommend learning VB .NET because nobody seems to use it... but if you're struggling with other languages you might want to give VB .NET a shot to learn basic concepts.
 
Best Thing about C++ is that you can type cast everything. You want The Bits of float into an int. With pointers its a done deal. You want to start reading random memory in the heap, pointers can do that. You are using a massive amout of memory and you dont want to wait for a GC to clean up. Using pointers and user defined memory mangment you can. Pointers Have a large learning curve but i have learned to love them. Btw You cant do this in java void swap(int a, intb) but you can in C++.
 
Back
Top