Click to See Complete Forum and Search --> : Well, I started teaching myself C++
Timman_24
04-21-2007, 06:19 PM
Its going pretty well. I got a book last night and already wrote two very basic programs. It is pretty fun actually. I'm using Dev-C++ right now, would be nice to have Visual Basic, but I dont have 300 bucks to throw away haha.
Anyone have some basic programing projects that I can try? Such as taking the average of a certain amount of numbers, etc?
Anyone else teach themselves C++, if so about how long did it take to get proficient in the language?
Thanks!
Strogian
04-21-2007, 10:44 PM
Write a program that outputs, in words, what a declaration means.
e.g.
int **(*func)()[7]
func: pointer to function() returning array[7] of pointer to pointer to int.
I think that's right. Kind of rusty on my order of operations.
Not necessarily basic, but this was the exercise from K&R that was the most help in my understanding of pointers.
Don't be afraid to write something that is actually useful every now and then, either. ;)
Timman_24
04-21-2007, 10:49 PM
I'll give that a try tomorrow. So far I've written one that takes the derivative of a polynomial, one that averages three numbers together, and one that converts celsius to fahrenheit.
Mostly math based, I havent gotten deep into logical operators yet. I'll work on some of that tomorrow.
my basic c++ book came with a simple graphics library which allowed to draw points, lines, circles, and text in a window it also had mouse click detection
its very easy to learn all the functions making it good for beginner projects
the book was called big c++ and im pretty sure their site has the libraries for download
Look into the Visual Studio Express editions if you want to move to a 'real' IDE ;)
As for projects in an OO world, start putting together a class library of helper functions that you'll use repeatedly. For example, a FileIO class with methods that lets you easily open a text file and read/write a column of numbers. Anything you write twice should go into a (well-documented) library.
Mancora
05-21-2007, 05:59 PM
One suggestion would be to head over to your library and pick up C++ book, and work through it. It can be a bit dry but its not a bad way to make sure you end up with a firm understanding of the basic control structures, classes, methods and structures (probably some other stuff i'm forgetting).
Once you get that stuff down you can go in any direction you want to and pick up stuff as needed IMHO.
If you head off to bigger stuff before getting the basics down I suspect you'll be pushing yourself into frustrating corners.
richardginn
05-25-2007, 09:04 AM
If you head off to bigger stuff before getting the basics down I suspect you'll be pushing yourself into frustrating corners.
I fully agree.
monroeski
05-25-2007, 06:06 PM
One suggestion would be to head over to your library and pick up C++ book, and work through it.
Of course, he mentioned in the first post that he already GOT a book... ;)
hu flung dung
05-26-2007, 01:54 AM
Anything you write twice should go into a (well-documented) library.
I sorta disagree. I think when you're just starting out programming, it's important to experiment with different ways of implementing similar functionality, so you can get a feel of how some solutions are more elegant (efficient, simple) than others in different situations.
benneke
11-23-2007, 07:58 AM
i must disagree with the choice for visual studio as good IDE for creating C/C++ programs. The builtin compiler isnt a very goodone. The compiler in DEVC++ (gcc compiler) is alot better, especialy when using templates and the STL
We program alot of algorithms (including self implement datastructures) and we have noticed that, if we compile the same program on vs and on gcc, the result binairy program that was created by gcc is faster then the one on vs
Strogian
11-23-2007, 09:51 PM
I like VS just because it's easier to make Windows apps, more penetration, easier to find help, etc. But yeah, if you're coding for speed, by all means try everything out there and use whatever is fastest.
For "teaching yourself C++", I don't know if I'd really recommend using anything open-source unless you're on linix. ;)