Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 06-26-2005, 09:35 AM   #11 (permalink)
 
Super Techie

Join Date: May 2005

Posts: 479

furtivefelon

Default

for these beginner question.. you should really pick up a beginner book that shows you step by step how to make it work most of us don't have the time to write a step by step tutorial to help anyone..
__________________
lisp hacker
running: FreeBSD 5.4 - still learning
develop with: SBCL + emacs for lisp, Anjuta IDE +gcc for c, SPE for python..
browse with: opera
furtivefelon is offline  
Old 06-27-2005, 09:23 AM   #12 (permalink)
 
True Techie

Join Date: Aug 2004

Posts: 223

KornNut

Default

Quote:
Originally posted by furtivefelon
it incites less wonder in the linux world.. as there comes a text editor that can edit any file with full syntax highlighting it's called kate..

As great as Linux is, far more people use Windows and I'd bet that the thread starter - AndTwenTy10 - uses Windows.

Sure, Kate is a great text editor, but for us Windows users, we must use Textpad.

Also, why do you act like Textpad doesn't have full syntax highlighting???

____

To answer your question AndTwenTy10, I don't know which version you downloaded for Textpad, but I think you can do the following:

File -> new project -> C++ Windows Console Application

Then start coding.

As furtivefelon had suggested, pick up a C++ tutorial book at your local library. Read through it and do all of the practice problems in a new project file in Textpad.



note: I don't recall if you have to instanciate the standard namespace; just try having this line at the top of your code:

using namespace std;
__________________
3.0 GHz P4 w/ Hyper Threading
1 Gig DDR RAM
9800 Pro ATI Radeon
7.1 Soundblaster
DVD Burners are a must!
19\'\' Samsung LCD
______________________________

In this world gone mad, we won\'t spank the monkey. The monkey will spank us!
KornNut is offline  
Old 06-28-2005, 12:27 AM   #13 (permalink)
 
Super Techie

Join Date: May 2005

Posts: 479

furtivefelon

Default

Quote:
Originally posted by KornNut
As great as Linux is, far more people use Windows and I'd bet that the thread starter - AndTwenTy10 - uses Windows.

Sure, Kate is a great text editor, but for us Windows users, we must use Textpad.

Also, why do you act like Textpad doesn't have full syntax highlighting???
i didn't assume he uses linux, as i recommended in the end an arguably better piece of software for editing sourcecode: notepad++ (try a google search)...

Texpad in my experience is only good for two languages: java, c++/c.. outside of those two (very popular) languages, the support for syntax highlighting is next to none.. however, kate has support for a range of about 20-40 (didn't count) different types of files, ranging from haskell to lisp to fortran, and of course, java, and c++
__________________
lisp hacker
running: FreeBSD 5.4 - still learning
develop with: SBCL + emacs for lisp, Anjuta IDE +gcc for c, SPE for python..
browse with: opera
furtivefelon is offline  
Old 06-28-2005, 11:04 PM   #14 (permalink)
 
True Techie

Join Date: Oct 2004

Posts: 183

AndTwenTy10

Send a message via AIM to AndTwenTy10 Send a message via Yahoo to AndTwenTy10
Default

Where do I get the compliars at? I type a code in text pad then save it... then what do I do with it?
AndTwenTy10 is offline  
Old 06-29-2005, 11:19 AM   #15 (permalink)
 
Super Techie

Join Date: May 2005

Posts: 479

furtivefelon

Default

gee, may be you should really master the art of googling before you do anything online a simple search online (textpad + java) give me this link: http://cs.colgate.edu/APCS/Java/Java...es/textpad.htm
__________________
lisp hacker
running: FreeBSD 5.4 - still learning
develop with: SBCL + emacs for lisp, Anjuta IDE +gcc for c, SPE for python..
browse with: opera
furtivefelon is offline  
Old 06-30-2005, 12:13 AM   #16 (permalink)
 
True Techie

Join Date: Oct 2004

Posts: 183

AndTwenTy10

Send a message via AIM to AndTwenTy10 Send a message via Yahoo to AndTwenTy10
Default

It's easier and better to get the opinion of people that are experianced in the field...
AndTwenTy10 is offline  
Old 07-01-2005, 01:19 PM   #17 (permalink)
 
Super Techie

Join Date: May 2005

Posts: 479

furtivefelon

Default

i really don't think you need experience on how to "compile and run a program", basics should be there before you ask any help (or take a course, where teachers are there to show you what to do..)
__________________
lisp hacker
running: FreeBSD 5.4 - still learning
develop with: SBCL + emacs for lisp, Anjuta IDE +gcc for c, SPE for python..
browse with: opera
furtivefelon is offline  
Old 07-17-2005, 04:03 AM   #18 (permalink)
 
Junior Techie

Join Date: Jun 2005

Posts: 94

ever_thus

Default

I've found people find it a lot easier to follow the steps when thay understand what's happening, so I'll give you a brief tutorial. This is a little long, so hold on.

Programs start off source code. That's the instructions that your programming language provides for you; things like int x = 5;. The source code is pure text. That means it has no more meaning to your computer than it does to you written on paper. (In fact in the old days programmers began by writing the code on paper.)

To make the source code useful you rum it through a special program called a compiler. The compiler analyzes your source code and deduces from it what you want the computer to do. It then produces machine code (lots of wierd and arcane numbers that the computer can understand as instructions) that tell the computer to do what you intend.

For the sake of completeness I'll detail the final step. The compiler generally produces object code. To understand what this means, consider that large projects use may source code files that reference each other. When each one is compiled, the compiler can't tell what these references are to (each file is compiled as if it were the only one). So the final step is to run all the object code files through a linker which fills in (resolves in CS speak) all the references.

The end result of all this is executable code stored in a binary file that can be run the way any program is run. Which makes sense, because it's been written the way all programs were written.

As you can see from this, writing source code requires only an editor that can edit text. (In fact, avoid things like Word because they put in fancy formatting that will confuse the compiler.) To make their life easier, though, many programmers prefer what's known as programmer's text editor. This has featues such as coloring different types of keywords (variables, strings, etc...) different colours, alerting you when you've entered an illegal synatx, and so on.

Once you've edited the source code to your satisfaction, you run the compiler. As previous posters have said, each compiler has its own different methods. Basically what you need to know is that the compiler is a program that takes your source code as input and spits out the object code as output. All you need to learn is how the compiler likes to receive your source code and what it will do with your object code. Almost evry compiler has a lot of fancy bells and whistles, but you'll learn to use them with time. Just remember that the compiler will probably come with documentation, which is what we like to call the help file; refer to it whwnever you've got a problem.

Most compilers will automatically link the object code. If your's doesn't just get a linker. Using a linker is the same as using a compiler, except that the input and output are the object file(s) and binary files.

Finally, you might want to consider an IDE. This is a program that combines the programmer's editor, compiler and linker into one tool. IDEs normally provide a lot of other programming aids, such as parameter type checking and suchlike. I don't like IDEs as I feel they make programming much more complex than it already is, but I know people who wouldn't program without one. In the end it's all down to personal preference.

I hope this helps. By the way, when you're new and inexperienced, getting people's opinion is more helpful. But once you've got enough knowledge to be able to be able to follow basic information you'll find the internet a much more useful source of information.
ever_thus is offline  
 
Closed Thread

Thread Tools
Display Modes

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 On
Refbacks are On