If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

seeking some advice

hello, i have decided i want to learn a little bit of c++,i have no programming experience apart from being a fairly decent BASIC programmer when i was at school many years ago

i have found a few good sites to learn from and have got myself borlands compiler which ive not used yet...

what i was after though was some suggestions from programmers of what would be a good thing to start with to help me learn...i have read that it is fairly easy to code your own port scanner so i was thinking of doing that..is there anything else though that would be a good thing start with?

C++

C++ is somewhat of a pain. All of the programmers I know have started out with smaller programming languages like basic. Since you said you have done basic next I would move on to shell scripting, or python. C++ has a lot of complicated coding involved in it. I tried to learn C++ a while ago and found that there are other (not as popular) languages that offer just as much power and stability that are easier to use.

The way I see it the faster you can learn the faster you can start. Although, after you learn other easy languages C++ will seam simpler since most programming languages have the same structureing for commands.

Another piece of advice, There are soooooo many port scanners out there for every platform that one more would be like making another calculator program. If I was to spend my time learning C++ I would code something that showed I had learned it well. Port scanners only take a few (ranging from 10+) lines of code.

Hello Ivan

I am currently taking a class in college that teaches C++, if I was you I would start with simple programs (basic calculation programs, input from user programs, etc) I wouldn't start on something big until you get all the basics down.

"A man who builds his house in the sand, soon finds his home washed away with the tides"

Write some useful programs for yourself! Example: I used to write programs for an accounting class to help figure the payroll chart values (gross pay, state & fed tax, fica, etc) They weren't pretty programs but they got the job done, and helped me to learn the language syntax.

If your interested I can post some of my college homework on here or at my site for you to work on.

Simon Templer

\"Your work is to discover your world and then with all your heart give yourself to it. \"
-The Buddha

simon and terr,would you agree with spazzmarix that i might find it hard juping straight into c++?

yeah i have heard that port scanners are easyish to code,i don't actually need one but i need something that might serve as a good introduction for my first attempt at whatever language i decide to have a go at..

as soon as decide what im doing i do intend odering at least one book on it and would appreiciate any suggestions on any good ones...

simon , thanks i would like a look at some of your college homework if you dont mind, it might help my come to desicion..

C++ Problem For You

As I promised I am posting a problem or two from my class... If your curious the book we use in my class is: An Introduction to Programming with C++ By: Diane Zak

Here is a problem out of the book that should be fairly simple:

Excerpt from book:

A third grade teacher at Hinsbrook Elementry School would like you to create a program that will help her students learn how to make change. The program should allow the student to enter the amount of money the customer owes and the amount of money the customer paid. The program should calculate and display the amount of change, as well as how many dollars, quarters, dimes, nickels, and pennies to return to the customer. For now, you do not have to worry about the situation where the price is greater than what the customer pays. You can always assume that the customer paid wither the exact amount or more than the exact amount.

Here are some desk-checks for the above program listed in my book:

75.34 as the amount due and 80.00 as the amount paid
39.67 as the amount due and 50.00 as the amount paid

Try this on for size, and if you like coding in C++ then I will post more problems in my book! If you need help let me know, and I will be glad to help you!

Note: Oh yeah, Terr is right...if you've coded in VB then it can advocate bad coding habits like not declaring variables. The language is complex, but don't let it scare you!! Once you get the hang of it...You'll be fine.

Good Luck...Don't give up without a Fight

Hope this helps you!

Simon Templer

\"Your work is to discover your world and then with all your heart give yourself to it. \"
-The Buddha

thanks simon, i know i could have programmed the above task in basic fairly quickly so i decided to install borlands and have a go at in c++, thing is it is the first time i've tried any programming on a pc and i'm not really sure what i'm doing with this compiler...

i've installed it and had the little box up that says something about converting text files but im not really sure what to do with it to get a script in and try to get it running..

could you give me a couple of pointers with it to get me started,sorry for been so lame, but as soon as i get off the ground i think i might make fairly good progress..thanks again.

First...YOUR NOT LAME !!!! Don't be afraid to ask for help...you think everyone else just started programming without asking someone for help...

Ok...you said that you installed the Borland C++ compiler, if it is the same compiler that I have then you downloaded and installed the freecommandLinetools.exe. At this point I also recommend that you download Turbo Debugger; when you get more indepth in the langauge and writing more complicated programs it will help.

Configuring The Compiler

Once you have ran the setup programs, the compiler should be installed at "C:\Borland\BCC55" (Assuming that your hard drive is C ) there should be several folders and a few text files.

The "Readme.txt" file contains the information for configuring, it basically asks you to create two text files, paste the indicated lines from the "readme.txt" and rename them to *.cfg files. These two files should be placed in the "Bin" folder.

You should also remember to add a PATH statement in your AUTOEXEC.BAT pointing to the "Bin" folder.

Once you have finished configuring you should be all set to have fun compiling.

Creating the C++ Source File

The C++ source file is nothing more than a text file with the extension .CPP . So to create a program just open your favorite text editor (I personally just use M$ Notepad) and type your program. Next...change the file extension from TXT to CPP.

Compiling A Program

Once you have created your source file...it's time to compile! The compiler that we have is a command line compiler so you will need to start DOS. Change to the directory where you have saved your source file. (I created a folder on my C: drive called "CPPs" where I place all my source for easy DOS access) The compiler is "bcc32.exe", so if you added a line in your AUTOEXEC pointing to the "Bin" folder you can simply type the following:

bcc32 [sourcefile.cpp] (where sourcefile.cpp is your source file)

Example:

C:\CPPS>bcc32 sourcefile.cpp
If you have any error messages you will see them now, if you don't then the compiler will compile your source into an Object file (*.OBJ) and the linker will create an Executable.

Congratulations you have just created your first C++ program

The object file and executable should now be in the same folder as your source file.

This should be enough to get you started, if you need any more help...or if my directions were not clear enough...Drop me a line...I will be more than happy to help you.

Just remember not to be intiminated by the depth of the language, once you get the basics down you'll be ok.

Good luck and I hope this has helped you

Simon Templer

\"Your work is to discover your world and then with all your heart give yourself to it. \"
-The Buddha