There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Beginner information. . .


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
Raistlfiren's Avatar
Senior Member with 300 posts.
 
Join Date: Jul 2004
Experience: Intermediate
16-May-2005, 04:35 PM #1
Beginner information. . .
If I were starting out to try C++, what would you recommend to start out on? I have looked at multiple websites of information on C++, but nothing is really clicking. Is there an easier way to learn this, like by learning JAVA first or just buying a book from a store that may explain C++ better? Of course, this is all on my own time, and Im self teaching myself... Do you have any suggestions on starting out?
Rat
yto_daniel's Avatar
Senior Member with 216 posts.
 
Join Date: Mar 2005
Experience: Advanced
18-May-2005, 06:22 PM #2
Understanding how java works will help you understand the Object Oriented concepts that C++ introduces over C. Learning JAVA may help you understand how C++ works better, but java is also a nicer language as far as available libraries and that sort of thing (in my opinion)

My recommended way to start learning C++ would be to simply have a project you want to program, you can sit down and try to learn it, but nothing helps you learn how to program then starting a project and learning how to make it work, using object oriented design.

Daniel - YourTechOnline.com technician
danielr@no_spam_yourtechonline.com (remove no_spam_)
Raistlfiren's Avatar
Senior Member with 300 posts.
 
Join Date: Jul 2004
Experience: Intermediate
18-May-2005, 07:59 PM #3
I do have a simple program I was looking at building. Like I said though, I don't know where to start at. I was looking at making a simple, but yet a basic program at the same time. I was looking at making my own picture slideshow program. Starting out at the begginning of course. First simply starting out by making a simpole crowser interface that will allow you to add pictures to. . . Though, I really don't know how to go about doing that... :/
Rat
yto_daniel's Avatar
Senior Member with 216 posts.
 
Join Date: Mar 2005
Experience: Advanced
18-May-2005, 09:49 PM #4
Sounds like perhaps the best thing for you to do is some reading.
Here is some C++ tutorials.
http://www.cprogramming.com/tutorial.html
And here is some Win32 API tutorial's, if your going to be building a browser type program, you will be learning the Win32 api.
http://www.winprog.org/tutorial/

Daniel - YourTechOnline.com technician
danielr@no_spam_yourtechonline.com (remove no_spam_)
Raistlfiren's Avatar
Senior Member with 300 posts.
 
Join Date: Jul 2004
Experience: Intermediate
18-May-2005, 11:04 PM #5
Okay,
Thanks for your info, I will read up on some C++.
Rat
Shadow2531's Avatar
Distinguished Member with 2,629 posts.
 
Join Date: Apr 2001
19-May-2005, 12:35 AM #6
First, download and install Mingw 3.4.2 so you can compile c++ programs
http://www.nuwen.net/mingw.html (follow directions on that page)

Copy the following code into your favorite text editor; making sure the last line in the file is blank.

Code:
#include <iostream>

using namespace std;

int main() {
    cout << "\n" << "Hello, world!" << endl;
}
save as hello.cpp to your desktop.

load up the command prompt and make sure the current directory is your desktop.

Type the following command and press enter.

g++ -Wall -Wextra hello.cpp -o hello

That will create hello.exe

Type hello and press enter. The program will run.

If you specify want OS you are using, we can give you some more specific directions.
__________________
10 ? "a line as the unending horizon"
20 ? "a curve as the rolling hillside"
30 ? "a point as a distant bird"
40 ? "a ray as the rising sun"
run
Arcadion's Avatar
Computer Specs
Senior Member with 1,756 posts.
 
Join Date: Sep 2004
Location: Taupo, New Zealand
Experience: IT Professional
19-May-2005, 01:06 AM #7
A good book to teach yourself C++ with is "C++ How to Program" by Deitel & Deitel, it's what I used when I was at high school and was the standard text for introductory C++ courses at my university. For what you're wanting to do I would suggest learning Visual Basic first, and take up C++ second--I learnt BASIC and VB before C++.
Raistlfiren's Avatar
Senior Member with 300 posts.
 
Join Date: Jul 2004
Experience: Intermediate
19-May-2005, 08:33 PM #8
I have figured out how to do that Shadow, though I mauy not know what the heck I am doing... hahahaha

So are there more than one visual basic program out there? I am guessing this, because when I look up information for Visual Basic it has a different interface from Microsoft Visual C++ 6. . . Is Microsoft Visual Basic different?
Rat
yto_daniel's Avatar
Senior Member with 216 posts.
 
Join Date: Mar 2005
Experience: Advanced
19-May-2005, 09:25 PM #9
As far as I know, there is only one Visual Basic(Microsofts), Visual Basic is a completely different programming language. If you have Visual Studio 6 Then you'll have visual basic already.

Daniel - YourTechOnline.com technician
danielr@no_spam_yourtechonline.com (remove no_spam_)
Raistlfiren's Avatar
Senior Member with 300 posts.
 
Join Date: Jul 2004
Experience: Intermediate
19-May-2005, 09:35 PM #10
Microsoft Visual C++ is not the same, then?
Rat
yto_daniel's Avatar
Senior Member with 216 posts.
 
Join Date: Mar 2005
Experience: Advanced
19-May-2005, 09:38 PM #11
Microsoft Visual C++ and Microsft Visual Basic are totally different programming languages, Arcadian suggested it becuase Visual Basic is sometimes alot easier to understand for a beginning programmer.

Daniel - YourTechOnline.com technician
danielr@no_spam_yourtechonline.com (remove no_spam_)
Raistlfiren's Avatar
Senior Member with 300 posts.
 
Join Date: Jul 2004
Experience: Intermediate
19-May-2005, 09:49 PM #12
Oh I understand now. Two totally different languages... Man, so much stuff to choose from! Dang. . . Gosh, the question is what is the best way. . . I am so lost in this C++ stuff.

I have been looking at some source code on making a basic calculator in C++, but this stuff isn not clicking as well as I thought it might click. Just don't really know where to start at. I know, you have to get the basics down first, but don't know what to do after I get the basics down... :/
Rat
TofuTheGreat's Avatar
Junior Member with 7 posts.
 
Join Date: May 2005
Location: Wisconsin USA
Experience: Semi-advanced as I don't know Macs (yet)
24-May-2005, 04:55 PM #13
The thing to realize is that programming languages are not a one-size-fits-all type of thing. Each language has its own strengths and weaknesses.

If I may ask some questions and make some suggestions?

First question, what is your familiarity with programming in general? Are you comfortable with program flow, logic, looping, etc.? If not then you should first read up on program and algorithm design before you delve in to specific languages.

Second question, what kind of goals do you have for your programs? Are you looking to create small utilities and applications for your own use and possibly freeware/shareware distribution?

Third, what kind of programs do you want to write? Small applications like graphics browsers, password managers, calculators, etc. are one thing. But programs that interact with the core of the operating system are a totally different bird.

Finally is your target platform strictly Windows or do you want to be able to port your programs to Unix/Linux, Mac, etc.?

Answering these questions will help to determine what program language(s) to learn. For instance Visual Basic will ONLY work on Windows platforms. It was designed by Microsoft specifically for Windows programming. Visual C++ is a "flavor" of C++ that happens to be geared heavily towards the Windows platform. Straight C++ (a.k.a. ANSI C++) is a "portable" language in that pure C++ programs can be modified to run on almost all OS platforms.

Visual Basic (VB) is definitely a good starting language to get used to objects, functions/subs, program flow and algorithms, etc. Much of the nitty-gritty programming work is done by the development environment (IDE). Instead of having to know how to code a button from scratch you just drop a button on the form. This lets you concentrate on the main logic of how your program will use the button. This makes taking the calculator project pretty simple in VB and a good choice.

I would also recommend that you learn more than one language. Some languages are simply better at doing things than another language. VB is a great tool for creating user interfaces and database applications while C++ is awesome for creating very fast programs as well as operating systems themselves. C++ is also used for creating programs that handle protocol communications (i.e. email, web browsers, ftp, etc.).

For instance you could write a .dll in C++ that handles TCP/IP communications. Then a VB program's interface is created to "wrap" the C++ .dll's functionality. So your graphics browser could be a VB interface that uses that .dll to upload the picture to a webserver.

Best of luck and keep asking the questions as that's the way to learn!


Christopher


Quote:
Originally Posted by Raistlfiren
Oh I understand now. Two totally different languages... Man, so much stuff to choose from! Dang. . . Gosh, the question is what is the best way. . . I am so lost in this C++ stuff.

I have been looking at some source code on making a basic calculator in C++, but this stuff isn not clicking as well as I thought it might click. Just don't really know where to start at. I know, you have to get the basics down first, but don't know what to do after I get the basics down... :/
Rat
s
Raistlfiren's Avatar
Senior Member with 300 posts.
 
Join Date: Jul 2004
Experience: Intermediate
24-May-2005, 05:52 PM #14
Thanks for all of that great information ToFu.

The first question I don't really know how to answer. I am not all that familiar with programming. I have done some HTML coding of a website, but that is about it. I have tryed looking into some C++, and have used Visual Basic C++.

The programs I wanted to make would be more for myself/freeware programs. I would like to be able to rely on myself to do things instead of relying on other companies. I was wanting to make my own things so I could optimize them and tweak them. So then I could make the program better and more how I like it. (More suitable for my needs)

The program I was looking at building was all sizes. I was looking at just building my own pi program, that I could run in the background of my server to calaculate pi. A program that I can customize to tell it how much cpu to only use, disc space, and etc....

The other program I was looking at making was my own slideshow picture maker. I believe this would be one of the bigger programs because I was looking at making a nice little interface with all types of different things to do with it. For example burn DVD slideshows, CD slideshows, exxecutable slideshows, and be able to customize my slideshows a whole heck of a lot more...

My target platform is any of them. I hope to be able to use my programs on any platforms, meaning linux, windows, and MAC. . .

I have checked out VB, but it looks a little bit more weird then just typing pretty much everything out in C++. I was just hoping to know and understand more of different programming languages so I can rely more on myself. Make a few programs that are suitable for me and other people... I am just kind of lost though in this whole C++ programming stuff. I look at the very first line and don't even understand #include<iostream.h> or #include<math.h>. I understand most of the bottom stuff, but the top just kind of confuses me. I was just looking at this calculator program...
{
HANDLE hCon = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hCon,color);
}
What in the heck... I understand a lot of the other middle stuff like case0,case1, case2, cout, cin, and all of that... The bottom code is just weird.... I found the calculator source from this site. http://www.cprogramming.com/cgi-bin/source/source.cgi?
action=Category&CID=8
Rat...
TofuTheGreat's Avatar
Junior Member with 7 posts.
 
Join Date: May 2005
Location: Wisconsin USA
Experience: Semi-advanced as I don't know Macs (yet)
25-May-2005, 10:05 AM #15
mmmm, I love the smell of source code in the morning
Quote:
Originally Posted by Raistlfiren
The first question I don't really know how to answer. I am not all that familiar with programming. I have done some HTML coding of a website, but that is about it. I have tryed looking into some C++, and have used Visual Basic C++.
Just to clarify. C++ is one language and Visual Basic is another. Visual Basic C++ would be a mutant stepchild if it existed.

Warning longish-novel-post follows.

Now let's see if we can't help you out with the world of programming. First I would suggest a book called Simple Program Design. It'll introduce you to programming concepts. The "For Dummies" books can be good but who wants to have a book that's calling you a dummy?

Now, on to some specific questions from your last post.
Quote:
Originally Posted by Raistlfiren
I was looking at just building my own pi program, that I could run in the background of my server to calaculate pi. A program that I can customize to tell it how much cpu to only use, disc space, and etc....
Wow. On the surface this seems like it would be a simple program but it's actually very, very tough. I would actually avoid this one like the plague until you've gotten your feet a bit wetter. The problem is the infinite nature of pi itself. You get into problems with data types, precision, resource allocation (i.e. memory, etc.). You could quickly come up with a program that would crash your system in a second. Universities have cluster farms trying to calculate pi.
"It is interesting to note that even today pi cannot be calculated precisely—there are no two whole numbers that can make a ratio equal to pi. Mathematicians find a closer approximation every year—in 2002, for example, experts at the University of Tokyo Information Technology Center determined the value of pi to over one trillion decimal places."Article on Nova
Quote:
Originally Posted by Raistlfiren
The other program I was looking at making was my own slideshow picture maker.
This is an ambitious starting project but not outside the realm of possiblity. You could use the versioning approach with each major version being the addition of a new feature. So version 1 would be a simple interface for displaying the images. Subsequent versions would be the add-ons you described.
Quote:
Originally Posted by Raistlfiren
I have checked out VB, but it looks a little bit more weird then just typing pretty much everything out in C++. I was just hoping to know and understand more of different programming languages so I can rely more on myself. Make a few programs that are suitable for me and other people... I am just kind of lost though in this whole C++ programming stuff. I look at the very first line and don't even understand #include<iostream.h> or #include<math.h>. I understand most of the bottom stuff, but the top just kind of confuses me.
This may be the best example of why you should look into VB first. To be truthful my first language was C and VB was about my 5th or 6th. But let's explain the "#include" statements. The statements are used to bring in pre-coded "libraries" into your program. Basically a library is a set of related functions. You bring them into your program so that you don't have to write them from scratch yourself (kind of a "don't reinvent the wheel" thing). Most every higher level language has this "include" functionality. For example in COBOL thier known as "copybooks" and you use the "copy" keyword.

So the "math.h" library contains all kinds of math functions (from basic through some trig if memory serves). The "iostream.h" library contains functions for I/O streaming to the console and I think even to the LPT1 port. Basically it handles writing things to the screen. You make calls to the functions in those libraries passing arguements (parameters) as needed.

The neat thing is that you can create your own library files so that you can reuse code without having to type it from scratch each time. Any function that could be repeated in multiple programs is a candidate for including in a library. This is a big time saver in larger programs.

You can also take a pre-defined library and customize it to your own needs (like stripping out sections you don't need to make your program smaller and faster). Just don't EVER overwrite the standard libraries. You'll be hosed if you do.
Quote:
Originally Posted by Raistlfiren
What in the heck... I understand a lot of the other middle stuff like case0,case1, case2, cout, cin, and all of that... The bottom code is just weird.... I found the calculator source from this site.
The problem you appear to be running into is the syntax of the language. Each language has it's own syntax and some are easier to read than others. Your above statement alone is probably enough for me to point you towards VB as your first language. Couple this with either the calculator or graphics display program and VB is even more appealing as your first language.

VB will allow you to seperate the programming of the interface components from the interface functionality. Coding a window from scratch is a major pain in the tush if you don't know what you need to do. It'll also confuse the heck out of a beginner as you need to know about handles, threads, interupts, etc.. It's easier just to let a visual language (Visual Basic, Visual C++, Delphi, etc) handle it for you. The same goes for the components like buttons, labels, text boxes, etc. This way you can concentrate on the core functionality of the program itself.

I would also suggest VB.Net instead of VB6. VB6 is simpler in many respects but eventually you'll end up going to .Net anyway and then you've got another learning curve to overcome. There is even a learning edition of Visual Basic.Net available online (~$80 US). I think Microsoft was even offering one for download? I'll see if I can find it again.

May I suggest that we concentrate first on the calculator program instead of the graphics browser? This will get your feet wet with the concepts of objects, functions, parameters, and most importantly program flow. Plus the calculator can quickly expand into other projects like a check-book tracker, home expense manager, stock manager, etc. Once you're familiar with the programming approaches then you'll be ready to move on to more ambitious programs. Think of it as the walk-before-you-run approach.

I'll be happy to help you along with the project.


Christopher
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 03:29 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.