Sign in to follow this  
bigjoe11a

Learning C++

Recommended Posts

What I'm looking for is some easy samples of C++. Like a Name and Address Program. I just started with C++ not even a week ago. And I just want to learn some thing new. Any Help from any one would be great.

Share this post


Link to post
Share on other sites
The best way to learn is to do it. After a week you should at least be familiar with int main() (the entry point of a C++ program), and std::cout (the mechanism that allows you to print strings to the console). To do a name and address program you will also need to understand how std::cin works, and how to use variables to store and retrieve values. You may not have encountered those concepts yet, so look for examples that use std::cin to let the user type in a value, store it in a variable, and then print it out using std::cout. If you can do all of that, then you can start on your name and address program.

Share this post


Link to post
Share on other sites
Thanks but I was hoping some one would have made a sample like that. So that I could study the code and learn how the forms are setup. Right now I'm just playing with it and I didn't get a manual with it. I got it from ebay. I have a tutorial on Borland C++ builder. Its just that I have some options missing in the Version I have and some options in the tutorial I don't under stand. Thats why I was hoping for some thing that was simple. Like a program that lets you keep Name and Address. You know like an address book. or some thing. Just some thing for me to study on.

Share this post


Link to post
Share on other sites
Quote:
Original post by Rocksy
You might want to look at this page... there are some sample assignments in the Challenges section, and the tutorials are helpful as well. Happy coding!


Thanks Rock. But I wanted a real program sample. Just parts of one doesn't help.
I have been able to find lots of samples. I just can't find sample programs. If you get the idea. I fount out that C++ is no where near Basic nor Pascal. So the programming language is no where near the same. I have played with the tutorial that I have. Its just that options from the tutorial are missing from the IDE that I have.

I just think that the tutorial I have is out of date. I wish and I have been looking for an updated one. One thats not even a year old. and thats hard to find.


Share this post


Link to post
Share on other sites
Okay, how's this:
http://www.retroremakes.com/forum2/showthread.php?t=10247.

It's a little side project of mine that I'll be making a website for soon enough. It's inspired by the old BASIC type-in books, many program play just like them, but updated to C and C++. I've written almost all of the programs but I hope once there's a website that it'll inspire contributors.

I'd love to have a simple example of making an address book or something.

Share this post


Link to post
Share on other sites
Quote:
Original post by guesst
Okay, how's this:
http://www.retroremakes.com/forum2/showthread.php?t=10247.

It's a little side project of mine that I'll be making a website for soon enough. It's inspired by the old BASIC type-in books, many program play just like them, but updated to C and C++. I've written almost all of the programs but I hope once there's a website that it'll inspire contributors.

I'd love to have a simple example of making an address book or something.


To be up front with you. I never have been good at making games.

Guesst. If I could find a program. Just a program. some thing simple. I mite get some idea about how C++ works and how its coded. Look. Do you know of any Online classes that teach C++ and are cheap. I'm disabled and on a fix income.

Share this post


Link to post
Share on other sites
You realize you can pick up a decent level of knowledge online for free? If you go through the tutorials at cplusplus.com and cprogramming.com , you should have a very good idea of how to go about writing simple C++ programs.

Share this post


Link to post
Share on other sites
If you really want to learn C++, I'd suggest getting the Deitel&Deitel book, C++ How to Program. I think they're on the 6th edition now, but they're all about the same. It might run you close to a hundred bucks, but it's worth it, because if you go through everything in there, you'll know just about all there is to know about straight C++.

Share this post


Link to post
Share on other sites
Quote:
Original post by Megaman_22
If you really want to learn C++, I'd suggest getting the Deitel&Deitel book, C++ How to Program. I think they're on the 6th edition now, but they're all about the same. It might run you close to a hundred bucks, but it's worth it, because if you go through everything in there, you'll know just about all there is to know about straight C++.

Personally that's the last book I would recommend since I"m currently forced to use it for my C++ class and while most of it is technically correct it's overly verbose and you'll feel like the authors were paid by the word while reading it!
I"d recommend "Accelerated C++" ,though I don't really care for that book, before the Deitel one!
The Dawson book is good if you are totally new to programming and if you are more advanced you can't go wrong with Stroustrup or Lippman.

[Edited by - daviangel on January 2, 2008 4:17:17 AM]

Share this post


Link to post
Share on other sites
Quote:
I'd recommend "Accelerated C++"


From what I've heard, this is one of the best books on the planet for learning C++, though it will be difficult for someone with no programming background (and for someone without, but the effort is worth it).

Also, you might want to take a look at the books in my sig. They're free, so you have nothing to lose [smile].

Share this post


Link to post
Share on other sites
There's a lot of really, really bad books out there on C++. It's difficult to figure out which ones are good, because quite unfortunately, many people review technical books on everything but... their technical accuracy.

Here are pretty much the requirements of any decent C++ book:

- Reflects modern C++, which is post 1999 revision. Any book that hasn't been written from scratch or very, very significantly rewritten after 1999 is out of date.
- Detail oriented. C++ books are not light reading. Nor is C++ a simple superficial language. Details matter, and a book that isn't detail oriented isn't good.
- Technically accurate. Harder than you think.

Lot of books fail this test. There's a number of C++ books I think pro C++ programmers should have gone through. Two of them qualify at the beginner level and those are "Accelerated C++" by Koenig and "C++ Primer" by Lippman. Accelerated C++ is designed more like coursework or a tutorial, and tries to teach you the idioms in C++. C++ Primer is designed more like your traditional reference/tutorial book.

No pressure to get just those books though. I trust those books to impart correct knowledge because I went through the material in those books after the 99 revision. If you're short on cash, make sure you get your money's worth...

Or pick another language that is easier to learn for free. Like Python (seriously, quality books/tutorials for free over the internet).

Share this post


Link to post
Share on other sites
Thanks I will give those ideas a try. and if any one has the time and interested.
I looking for some one to help me with it. Not just to teach me, But to get me started with some thing. One time a week. Send me a sample that I can use to create a program with, then send parts of it every week or so. That I can add to the first one.

At this time I couldn't pay you. I'm disable and on a fix income. SO any help would be great

Thanks
Joe

Share this post


Link to post
Share on other sites
Quote:
Original post by bigjoe11a
Thanks I will give those ideas a try. and if any one has the time and interested.
I looking for some one to help me with it. Not just to teach me, But to get me started with some thing. One time a week. Send me a sample that I can use to create a program with, then send parts of it every week or so. That I can add to the first one.


You can't learn C++ by just looking over examples and copying what they do; C++ is way too obscure in places (some might say in general) for that. You need a book to learn from.

Share this post


Link to post
Share on other sites
Quote:
Original post by Jerax
Quote:
Original post by bigjoe11a
Thanks I will give those ideas a try. and if any one has the time and interested.
I looking for some one to help me with it. Not just to teach me, But to get me started with some thing. One time a week. Send me a sample that I can use to create a program with, then send parts of it every week or so. That I can add to the first one.


You can't learn C++ by just looking over examples and copying what they do; C++ is way too obscure in places (some might say in general) for that. You need a book to learn from.


Every one says that. How ever. How do you think I learn Basic and Pascal. By reading the the sample programs to get an idea of how to use commands and options. Learning C++ is like Basic and Pascal. It take practice.



Share this post


Link to post
Share on other sites
I think when you are new to programming it is easer to start with basic or pascal. Mainly because it is easer to read and you'll get good idea about how programming works with variables and stuff. But when you start to get hang of it just go with c++ because that's the thing you actually want to learn

Share this post


Link to post
Share on other sites
I tried to write my first program in C++. A simple menu, Heres my code

//---------------------------------------------------------------------------
//Sample Menu
#include <iostream>
using namespace std;
//---------------------------------------------------------------------------

int main() {
bool quit = false;
while (quit == false) {
cout << "select a,b,c or q: ";
char ask;
cin >> ask;
switch(ask) {
case 'a' : cout << "You choose 'a'" << endl;
break;
case 'b' : cout << "You choose 'b'" << endl;
break;
case 'c' : cout << "You choose 'c'" << endl;
break;
case 'q' : cout << "QUITING MENU" << endl;
quit = true;
break;
default : cout << "Please select a,b,c or q" << endl;

} // ends case
} //Ends While Loop

} // Ends Main
//---------------------------------------------------------------------------

and when I try to compile and run it. I get errors.
[Linker Error] Unresolved external '__InitVCL' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\CP32MTI.LIB|crtlvcl
[Linker Error] Unresolved external '__ExitVCL' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\CP32MTI.LIB|crtlvcl

and any one tell me what I'm doing wrong


Share this post


Link to post
Share on other sites
Quote:
Original post by Gage64
I'm not familiar with C-Builder (or whatever it's called) so I'm afraid I can't help you with your problem, but if you're interested in switching IDE's, Visual C++ 2008 Express is free and is a great IDE with an excellent debugger.


Thank I downloaded it and I'm installing as I type this message to you. So what now. How about a tutorial on it. One that works



Share this post


Link to post
Share on other sites
That link contains a video that shows how to set it up and compile a simple program. After that, I suggest you look at the free book in the second link in my sig (called C++:A Dialog).

Share this post


Link to post
Share on other sites
Quote:
Original post by Gage64
I'm not familiar with C-Builder (or whatever it's called) so I'm afraid I can't help you with your problem, but if you're interested in switching IDE's, Visual C++ 2008 Express is free and is a great IDE with an excellent debugger.

Yes please do yourself a favor and download VC++ 2008 express and use that unless you have a specific need to use CBuilder.
And they got a video to get you started too as was mentioned.
After that just create a new win32 console program and make sure to select empty project on option and then add a C++ source file and add your code from above and it should compile fine.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this