I'm overwhelmed by the C++

lyssword

Diamond Member
Dec 15, 2005
5,630
25
91
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


 

stash

Diamond Member
Jun 22, 2000
5,468
0
0
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!
 

lyssword

Diamond Member
Dec 15, 2005
5,630
25
91
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.
 

Schadenfroh

Elite Member
Mar 8, 2003
38,416
4
0
My old C++ teacher has some really good and simple intro to C++ material on his web page for his intro to C++ class:

http://orca.st.usm.edu/~aspurgeo/

It is down right now, he must be updating it, check out his chapter 2 and 3 supplemental notes, he keeps it simple.
 

pcnerd37

Senior member
Sep 20, 2004
944
0
71
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.
 

Pwnbroker

Senior member
Feb 9, 2007
245
0
0
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.
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
Hersay only.

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

SonicIce

Diamond Member
Apr 12, 2004
4,771
0
76
Doh, need service pack 2 to install them. guess i had to upgrade sometime...
 

JustAnAverageGuy

Diamond Member
Aug 1, 2003
9,057
0
76
C# and Java are probably the best languages to learn if it's your first time.

Starting on C or C++ can be daunting.

- JaAG
 

Punamo

Senior member
Jan 28, 2001
302
0
0
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.
 

PowerEngineer

Diamond Member
Oct 22, 2001
3,597
771
136
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!

 

txrandom

Diamond Member
Aug 15, 2004
3,773
0
71
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.
 

Gannon

Senior member
Jul 29, 2004
527
0
0
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++.

 

dwell

pics?
Oct 9, 1999
5,185
2
0
C++ is a bastard language. Not recommended to learn programming on as others have stated. Java or C# is a good start.
 

jman19

Lifer
Nov 3, 2000
11,224
661
126
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.
 

jman19

Lifer
Nov 3, 2000
11,224
661
126
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.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
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#.
 

Ryland

Platinum Member
Aug 9, 2001
2,810
13
81
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
 

jman19

Lifer
Nov 3, 2000
11,224
661
126
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.
 

titan7

Junior Member
Jan 30, 2007
22
0
0
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.
 

Jeff7181

Lifer
Aug 21, 2002
18,368
11
81
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.
 

Cooler

Diamond Member
Mar 31, 2005
3,835
0
0
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++.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |