//flex table opened by JP

Click to See Complete Forum and Search --> : Elementary programming 101


Female
07-21-2001, 03:53 PM
Hello
Would you please take the time to tell me what each programming language can accomplish? cc+, linux, Java 2, VB, etc.
Are they interchangeable? Can some do things that others can't? Is it just a matter of different syntax? Or is each one for a special purpose? I don't know any of these, but am interested in Java 2. But if I should start with something else first, please let me know.
Thanks a lot. BTW, if this questions has been asked before ad nauseum, please give me the link to the "same **** answer". LOL.

qball
07-21-2001, 05:14 PM
Well, that would take a lot of time.

First, there are programming languages and OSes. A programming language IDE (itegrated development environment, what you use to write programs) and executables run in an OS. Let's just stick to PCs.

Major OSes:
DOS, CMP
Winders3.x, winders9X, NT, 2k, XP
Unix >> solaris
Unix >>Linux
others

Programming languages:
FORTRAN, Pascal
C/C++
Smalltalk
Java
VB, Powerbuilder, Delphi
others

So we have a lot of OSes and a bunch of programming languages. So let me get up on my soap box...

Most programming languages (PLs) are basically the same (relatively, kinda, sorta). Basically you can execute operations, branch and loop, period. All PLs do this by data manipulation and logical structures, if-then-else, do loop. Data Manipulation is well math and string/char data. Logical structures are the conditional and loop. There are different forms of the conditional, the if-then, if-then-else, if-then-elseif-else, case or swirch statement. Loops can increment 'do i=1, i=100, i+1', or be conditional 'while condition=true'. This is basically structured programming. Additionally, and implied above, all PLs support variables and statement/keywords that define and manipulate said variables.

See how easy this is. That being said, it is extremely important to understand and MASTER structured programming, imho. I'm amazed at Tech people who know the newer technologies (Java, EJB, etc) and can't program their way out of wet paper bag with a fully operational chainsaw. I diverge.

All LPs support the above. Next what differentiates LPs from each other is the level of sophistication. The next big words are OOP (Object-Oriented Programming) and Client-Server, etc.. Subjects much too large to expound upon.

So what's to do? My advice is to first learn
C. The basic difference between C and C++ is Streams and C++ is OO. So once you learn C, you can use to learn C++. Once you learn C++, all others will be different syntax and different object models. The concepts of structured programming and OO are universal.

Some may suggest Java (Java2 is the next version of java with EJB and some much better funtionality). Java was writtten for programmers. The fundamentals of Java are OO. It support structured programming, but the fundamentals are OO. So there is a level of sophistication that is most likely over your head from the get go. Not impossible to overcome, but learn structured programming first, then OO will be much easier to comprehend. Then you will look at Java and state, wow, this is pretty cool and easy.

Not that anyone cares, but my road map was/is:

FORTRAN
DOS, Lotus Symphony (123)
C
Winders3.x, NT, pcExpress,VB
VAX,UNIX
Powerbuilder, SQL Win9x
Java

Female
07-21-2001, 05:36 PM
Qball! I love you!
I have asked this same question in four forums now and you are the first to not talk down to or over me! This was a fascinating letter. I just printed it. Thanks for taking the time for me.
Now I need to find out about "C". I am going to follow your guidelines.
Now the scary part begins....but at least I have an inkling now as to what it's all about thanks to you! Or at least, a glimpse where it was total darkness before. LOL.
Take care.

Female
07-21-2001, 06:14 PM
qball
I found this:
http://www.geocities.com/SiliconValley/Hills/1317/

Do you know of a better site to start off with? Thanks.

Female
07-21-2001, 06:27 PM
qball

LOL. I'm back. Sheesh. OK I looked at the first lesson. The classic "hello world" lesson. I managed to run that program in Java 2. I downloaded the Sun stuff and I know some DOS so managed to get it to work. But now what am I using to do this in C? Not notepad? Do I have to buy the C+ compiler?
Thanks.

Ka0ticMiND
07-22-2001, 04:15 PM
about where to learn C programming, i would suggest www.cprogramming.com (http://www.cprogramming.com) , it goes from A to Z, they have stuff there about compiling the programs, although i would suggest a unix/linux system, it sorta helps you get used to the enviornment. You are able to write the C code in notepad, then run it into the compiler.

Fixed link (you can edit your post by clicking your <IMG SRC="http://www.sysopt.com/forum/edit.gif" border=0> icon) -Socalgal

[This message has been edited by socalgal (edited 07-23-2001).]

Ka0ticMiND
07-22-2001, 04:21 PM
btw
the link to the site is sorta messed up by that comma, plus, its a C++ tutorial site, so, here is a site with C tutorials, it does become quite advanced though: http://www.cm.cf.ac.uk/Dave/C/CE.html

for programming tutorials, i woudl suggest this site: http://www.programmingtutorials.com/main.asp

has tons of them.

qball
07-22-2001, 04:28 PM
you are the first to not talk down to or over me!


Jeez, I'm slipping.

Anyway,

The website is lacking much more than some really basic stuff. Good job with running Hello World in Java. Most people can't even figure out how to intall the SDK, but I diverge.

If you want to continue with Java, by all means. You can actually do anything C can do in Java rather easily. But let's get you moving with C. You can download a C/C++ (C++ is a superset of C, so all C++ compilers can compile C code). compiler from http://download.cnet.com/ or better yet, buy a book.

Turbo C++ Programming in 12 Easy Lessons
by Greg M. Perry (Paperback)
OR
C Programming in 12 Easy Lessons
by Greg M. Perry (Paperback - August 1994)

The book will come with a CD or floppy with everything you need. An IDE, to code and compile and run and debug code easily, and any necessary compilers. The C programming book is excellent, I haven't seen the Turbo C++, but C++ is a little easier than C and I recommend.

You can get these books online, obviously, or you might be able to get one from a library?! Check out ebay or www.bookpool.com (http://www.bookpool.com) .

Remember, you can always get ther C++ book. Do one of the lessons in C++ and then try it in Java. Then when finished with C++ book, you will have a good understanding of structured programming in each.

dragonB
07-22-2001, 06:18 PM
MHO to follow..
I think Java and C++ are fairly similar. If you got the Java working, I would learn that for a while, and then picking up C++ won't be as hard. Obviously there are some differences, big one I think is pointers, and it's much easier to learn those if you already have a solid Java foundation.

Here's my learning path..
Pascal,
C++,
Java,
Visual Basic,
other junk not really languages(asp, jsp, html, etc.)

Also, I'm curious what you all think of VB. I learned C++ and Java first. But what do you think of people starting with VB. Obviously it is a lot easier, especially for GUI oriented things. I think people would be pretty frustrated with other languages once learning VB. On the other hand, they might be thrilled with having more power/control over their programs.
cya dragonB

p.s. yea, qball rocks. He always gives a ton of great info

Ka0ticMiND
07-22-2001, 07:08 PM
just out of curiousity
would Tcl/Tk be considered programming?or scripting?

radbasa
07-23-2001, 12:22 AM
Good free online and d/ladble C++ and Java books at http://www.mindview.net/Books

also try http://www.ladysharrow.ndirect.co.uk/library/index.htm


for C, C++, Pascal, Java, perl, x86 assembly.
http://www.informit.com is also a good bet for online books. they got a lot of their older MCP, QUE, Sam's books online free.

my PL track
BASIC (not VB, the old line numbered BASIC)
Pascal
C
VB
x86 Assembly (why? i'm in hardware development. write progs that end up in ROMs. but i'm starting to prefer it over higher level languages. it just makes a whole lot more sense if you're used to fooling around with digital logic.)

[This message has been edited by radbasa (edited 07-22-2001).]

Rhino302
07-23-2001, 02:05 AM
My college was using Java in the introductory programming course. I've gotta take 4 more courses, 2 each of a language. Probably gonna do VB and Java simply because of my schedule. By the way, if Female wanted to start off real easy, I would say take a look at this link for learning SQL. You do it online and it saves your tables for you so you can go back, and its free. I'm not sure if there's anythign similar for real languages.


http://www.sqlcourse.com/

Female
07-23-2001, 07:26 AM
quote:
--------------------------------------------------------------------------------
Jeez, I'm slipping.
--------------------------------------------------------------------------------

LOL! Well, straighten up and fly right will ya!

OK, I'm getting confused. (BTW, a few questions to start off with: 1) it says here "HTML is OFF - UBB Code in ON" what's UBB?? 2) how do you reply with a quote in this forum (I had to cut and paste).

Well, you better make up your mind qball! I'm going to go to Chapters, the local book conglomerate, and buy a book this week. Should I buy C, C++, Basic, or what the ????? LOL.

It's in your hands, big guy...
Thanks! See ya later
PS-my instincts tell me to learn Java later.
PPS-thanks for the input to all the others also! It's appreciated a great deal.

Female
07-23-2001, 07:29 AM
BTW, I'm getting really excited about this!
Wooohoooooooo!!!

qball
07-23-2001, 03:43 PM
Ka0ticMiND,

TCL is "an interpreted script language". Anyway, scripting is programming. Much like OSes that support command languages is programming also.

Rhino302,

SQL is a standard. Any SQL that supports Stored Procedures or Functions has programming support. In the real world, SQL is huge because DBs are huge. SQL is good to know, but not in the spirit of the original thread.

Speaking of which;

I'll assume you know HTML (iffin you don't, learn, much easier than programming), so UBB is Universal Bulletin Board. It is HTML like in it has certain tags, like "quote" and "url". Anyway, this link should explain:

http://www.sysopt.com/forum/ubbcode.html

This allows you to use HTML/UBB in the message you write to be displayed on the post, and therefore the magic of the "quote" is no longer...

Sorry to be confusing, but IT is confusing. There really is no 'right' way or 'wrong' way to learn programming. There are mearly good ways and bad ways, young jedi. Now, I don't need to make up my mind, you need to decide, I already know how to do this, so I'm offering advice, you choose the path to follow.

Having stated that, I don't want to push you away from Java or PERL or TCL or FORTRAN or whatever. If it floats your boat, then go.

You may wonder why most beginning classes teach Java these days and I don't recommend. So here it is. Java is Object Oriented to the core. You can do "Hello World" in one simple println function call, but to any more complex you need to start using Objects. I claim that this is a level of sophistication that a beginner doesn't need to learn programming, they will later, but not now. Beginning courses teach only because Java is popular and a big keyword.

At the same time, I'm fearfully if you pick up a C++ book, it will be Object Oriented C++. Which will assume you know C and want to learn the ++ part. This won't help you much. The book I recommend is:

Turbo C++ Programming in 12 Easy Lessons
by Greg M. Perry (Paperback)

as;


In just 12 easy lessons, users will be writing code and getting answers to all of their programming questions. "Includes the Turbo C++ 2.0 compiler and all instructions needed to begin programming immediately. Covers loops, controls, relational logic, logical and bitwise operators, functions, and I/O with cout and cin. Disk includes the Turbo C++ 2.0 compiler and". Covers Turbo C++.

Post back with any further questions.

Female
07-23-2001, 10:08 PM
Thanks a million qball!

I'll buy that book this week. It's about $50.00 Cdn. here in Toronto; cheap for such a great learning device! I am also learning HTML from an online site and have put up a rudimentary webpage.

BTW, I found a "few" more books on the subject. Have a look. Do I havta read 'em all??? LOL. http://www.tiac.net/users/ikrakow/c.html

It was very kind of you to help me Sir. I'll report my progress. What are you into now? Flash, 3D, Animation, a new PL?????

Best regards

Female
07-23-2001, 11:40 PM
I'll assume you know HTML (iffin you don't, learn, much easier than programming), so UBB is Universal Bulletin Board. It is HTML like in it has certain tags, like "quote" and "url". Anyway, this link should explain:
[URL=http://www.sysopt.com/forum/ubbcode.html
Testing the UBB.

(URL line got posted twice somehow, then a wayward bracket....LOL)


[This message has been edited by Female (edited 07-24-2001).]

Female
07-24-2001, 04:32 PM
Thanks Radbasa for those online book leads. I called today to get the one qball recommends but had to have it ordered and won't get it for 4 to 6 weeks. Arghhhhhhhh!!!!! So meanwhile, I'll go to the links you provided.

Thanks for your help. It was very kind of you. http://www.sysopt.com/forum/smile.gif

qball
07-24-2001, 08:56 PM
Don't wait 4-6 weeks, find another resource. It is an older book, not worth $50, in my mind.

$28 at amazon.com.

Or get the Idiot's guide to C++. The websites will be helpful, but the structure of a book (well, a good book) will teach you things and then build upon them on later lessons.

Go to a library and see what C/C++ books they have, get 'em. You can read whilst you wait 4-6 weeks, lol. Or find whatever beginner C/C++ they have and get one of them.

Your enthusiasm is refreshing, but if it wanes... Sustain will see you through. If you want to do this, do it. I won't hold you back, I can only help.

As far as what I am into, well, humm, well, humm. My focus is more system level these days. I know programming (yeah, right!, lol) and DBs and OSes and Networking and people and generally the technology. This makes me very powerful and VERY dangerous (as I don't know everything). It also allows me to see the bigger picture and how all of the systems integrate and where the issues/bottlenecks/concerns fall. Lucky me.

I will tell you this, in my growth as a developer, I have had people willing to mentor me in what I do not know. I would like to think that I thanked them for there help (Hi Helen Murphy!). Regardless, I feel I can pay them back by doing the same.

Additionally, I drone. The number one focus of what I do professionally is "solve problems" effectively. A solution that causes another problem is not a solution. Programming apps should solve problems and make things better, not send me an email at 4am when the DB crashed (email should go to DBA, lol).

Female
07-24-2001, 09:20 PM
qball
You forgot to factor in the exchange on the US dollars. So it's about the same price. I have the gosh darn book on order and hopefully will get it soon. I saw it on ebay in the US of A, but would have had to pay duty to G.Bush Sr.???? LOL.
Well, I cried a lot, but then remembered the links that were offered here for online C++ books so that's what I am doing, and getting the compiler. I am too anxious to wait. Also, HTML is online. I figure it'll take me sixty to seventy years to get through all those courses mentioned here. What the hey. Then I can get rich like you.
You must be proud of your Great and Powerful Wizard of Oz status in the community and the respect and admiration you have. It sure as shooting didn't come overnight. I am grateful Master.
-Grasshopper.
PS-I'll report back when I have digested a bit of C. I'll write a "Hello qball" program for you! LOL. I liked the link that was offered here by Radbasa with the page that let you select the background colour. Simple but dynamic. Instant gratification. That is the joy I am going to get out of programming. The more complex and challenging it is, the greater the joy.
But you know that. I am sure to be pulling out hair at times, but we girls are used to hair removal.
Best wishes till next time. One last question? Do you have one of those overclocked babies with a freezer? A Thunderbird?

Female
07-24-2001, 10:10 PM
Also my thanks to
Ka0ticMiND
Rhino302
dragonB

I am grateful!

Female
07-25-2001, 06:52 AM
Good Morning qball
I got the compiler that you suggested last night. Borland 5.5. There were some references to adding lines to config file and a reference on one of the websites that says "it should be safe to use my tutorials with causing problems". I have EZ Recovery and an Image Program just in case.
I haven't figured out yet how to use the compiler. I looked into all the folders.

I need to be able to approach this knowing that when I do the tutorials with the compiler I am not messing up my system.

Will you please baby me and give me exact direction to using this thing? Where do I go in the program to compose code? The folders are bin, examples, help, include, lib. I am reading the help files but I just don't get it.

Command line? It can't mean to type code in the run/command line can it? Or is there another dialogue box to enter code into?
I feel like such a loser! LOL.
Thanks.

C++Builder includes many tools to help you create C++ programs.
The following table lists Borland tools that come with your C++Builder package:

File Description

BCC32.EXE C++ compiler (32-bit), command-line version
BPR2MAK.EXE Converts project file from XML to MAKE file format for use with command-line tools
BRC32.EXE Resource compiler (32-bit), command-line version
BRCC32.EXE Resource shell (32-bit)
CONVERT.EXE Converts .DFM form files into a .TXT file format
CPP32.EXE C preprocessor (32-bit), command-line version
DCC32.EXE Object Pascal compiler (32-bit), command-line version
FCONVERT.EXE Converts text files between OEM and ANSI formats
GREP.EXE File search utility
ILINK32.EXE Incremental linker (32-bit), command-line version
IMPDEF.EXE Utility used when building apps with Libraries
IMPLIB.EXE Utility used when building apps with Libraries
MAKE.EXE Make utility
REGSRVR.EXE Registers ActiveX and OLE server .DLLs
RLINK32.DLL Resource linker (32-bit)
TDUMP.EXE File dump utility

TLIB.EXE Utility for maintaining static-link libraries
TLIBIMP.EXE (Type Library Import) tool. Takes existing type libraries and creates C++Builder Interface files. Incorporated into the Type Library editor.
TOUCH.EXE Change files stamps to current date/time
TRIGRAPH.EXE Converts 3-character trigraph sequences into single characters
VCTOBPR.EXE Converts Microsoft Visual C++ 5.0 and 6.0 project (.DSP) and workspace (.DSW) files to their equivalent Borland C++Builder files
WS32.EXE WinSight32, 32-bit utility to watch Windows messages

Female
07-25-2001, 07:09 AM
I just tried to open the file C:\Borland\BCC\Bin\bcc32.exe

A black dos window shows for a nanosecond but doens't stay up.
Just shoot me! LOL.

dragonB
07-25-2001, 09:04 AM
I'm not familar with Borland, but here's my first impression.

The command line compiler probably takes a text file(probably with .c or .cpp extension) as an arguement, and then compiles it.
Also, a make file is basically a batch file that will compile a bunch of files(usually related in a project)
good luck,
Brian

Female
07-25-2001, 10:32 AM
This is my husband's opinion:
"I believe you write your code in any editor like Word or Notepad or,
ideally, the Borland C Builder software, then save in a file. You open the
compiler and type in paths and commands to point to that file. The compiler then
translates your intermediary code (C is between English and pure machine code)
into machine code (yesses and no's) and the program runs. If there is an
"answer" or result you want to see displayed, you need to write in code that
causes that answer to persist on the screen. Otherwise it would appear for a
split second and disappear, the program having done it's job."

Is he right?

I really need to know where to go to start working with this? LOL. Can I use word or notepad?
Thanks. Got any aspirins? Yes, it's a little soon in the game to ask for aspirins....but....

Rhino302
07-25-2001, 10:47 AM
That's how it works with Java, so it's probably the same. Probably easiest just to type out a short program in notepad, then compile it in DOS. Remember when you save the file in notepad to put quotes aroudn the whole name including the extension. On some systems it still adds a '.txt' extension if you dont

Ka0ticMiND
07-25-2001, 12:27 PM
actually
with the "new" windows OS's (win98 , 2000, me, nt, etc), they understand the .c or .cpp, well, i have tried .c, and it doesn't add a .txt, in the properties, it says its a "C file".Try it out yourself, open notepad, write some lines, save it as whatever.c, and look, its not a text file.
=]

-Ka0tic

Rhino302
07-25-2001, 03:35 PM
I just tried it, and it still saved it as a text document. I'm on WinME

Ka0ticMiND
07-25-2001, 04:39 PM
weird
i'm on 98, and did it, and it saved it as .c, would the compiler have anything to do with that?

-Ka0tic

Rhino302
07-25-2001, 05:01 PM
I would guess that you have probably opened an c file with notepad before, possibly before saving a raw one from scratch, hence notepad on your systems knows to associate a .c after the end of the file as an extension, and not part of the filename with a .txt extension

Female
07-25-2001, 06:15 PM
That's how it works with Java, so it's probably the same. Probably easiest just to type out a short program in notepad, then compile it in DOS. Remember when you save the file in notepad to put quotes aroudn the whole name including the extension. On some systems it still adds a '.txt' extension if you dont


What would be the command to compile in DOS? "Compile"? I'd have to say from what language to what language right?
Thanks.

I was told to: edit in notepad, compile in BCC, link with tlink. I don't know what to compile to/from or what linking refers to.
I haven't tried the prog.lang. yet. I'll do it in the next couple of days.
Edit: my husband says I should buy the editor, is it worth it?

[This message has been edited by Female (edited 07-25-2001).]

DemonKnight
07-25-2001, 06:30 PM
when it comes to C++ compilers I like dev-C++ from www.bloodshed.net (http://www.bloodshed.net) completly free and very nice. I'm using Sams Teach your self C++ in 21 days my self. I just wish I had your devotion. I've had the book since the christmas of 2000 and I'm only on day 4: Expressions and statements.

Female
07-25-2001, 08:06 PM
I have downloaded the Borland C++ compiler and I am following the online tutorial. Here is the basic program and the instructions given. I have saved the file as .cpp. I have managed to do the "Hello world" in Java 2 some time ago. I seem to remember that the file name had to have " " around it. I was advised to: "use notepad, compile with bcc, link with tlink". How do you compile and how do you use tlink (or is it ilink?)? When I try to open either .exe file they just disappear in a blink of an eye. They look like DOS dialogue boxes. I'm stuck.
Will you please give me a blow by blow as to how to get this first simple program running using BCC? I'd really appreciate it. Thanks!

#include &lt;iostream.h&gt;
int main()
{
cout&lt;&lt;"HEY, you, I'm alive! Oh, and Hello World!";
return 0;
}

"You can try out this program if you want, just cut and paste it into the IDE of a compiler such as DJGPP, or save it to a file ending with a .cpp extension, and use a command-line compiler to compile and link it."

OK...but HOW do you use the compiler and the linker?????? Please help again! Thanks.

I am reading the help file in BCC. It isn't getting any clearer. If I look up compiling....there are a myriad of subjects but I don't see how it works.
Doh!!!!

Female
07-25-2001, 08:16 PM
Is this the answer here? Please tell me exactly what to type to get that simple program in the previous post to run, including compiling and linking. Thanks! Do you smell smoke burning here? LOL.

C++ compile

(Command-line switch = -P)

The -P command-line option causes the compiler to compile all source files as C++ files, regardless of their extension. Use -P- to compile all .CPP files as C++ source files and all other files as C source files.

The command-line option -Pext causes the compiler to compile all source files as C++ files and it changes the default extension to whatever you specify with ext. This option is provided because some programmers use different extensions as their default extension for C++ code.

The option -P-ext compiles files based on their extension (.CPP compiles to C++, all other extensions compile to C) and sets the default extension (other than .CPP).

Ka0ticMiND
07-25-2001, 09:08 PM
i was checking out the borland web site
and i found a help file, for command line, you must download it though...=P

its located at :
ftp://ftp.borland.com/pub/bcppbuilder/techpubs/bcb5/b5tool.zip

try it out, i think it should have the answers...

-Ka0tic

[This message has been edited by Ka0ticMiND (edited 07-25-2001).]

milkchaser
07-25-2001, 09:44 PM
Golly, Female, you are working hard at this. I've been trying to get my brother to start programming and he's lazy compared to you!

Here's my two cents: C/C++ is harder to learn than Java, mostly because it's easy to make mistakes in any language, but it's much harder to find them in anything other than Java. Learning Java is easier than C++, especially if you use a friendly (free!) IDE like JBuilder Foundation (download from www.borland.com). (http://www.borland.com).)

All this funky stuff you're worrying about with where do I save my file, etc... JBuilder leads you by the hand through all that. And it color codes the programs you write so you can catch a lot of mistakes as you type (this is typical of all good IDEs, like C++Builder and all of JBuilder's competition).

Another nice thing about IDE's like JBuilder is that you can step through each line of your program one at a time and examine data values as they change. That's a very good way to learn. Without that feature (it's called a debugger), you have to debug by littering your program with print statements and trying to make sense of the results. It's a little like trying to figure out what an object is, not by looking at it and touching it, but by throwing little balls against it and watching where they bounce.

qball -- your instruction is good, but I think you mean to say, "I digress" rather than diverge.

Peace out.

[This message has been edited by milkchaser (edited 07-25-2001).]

ilcavero
07-25-2001, 09:59 PM
I learned basic C++ with the book
"teach yourself C++ in 21 days" of Jessy Liberty. I recomend it to you.

I can tell you that Java is a bit easier than C++, and I think it is easier to Apply objects in java than in C++, but I recomend you to learn C++ first anyway.

dragonB
07-25-2001, 10:03 PM
Female,
You are on the right track with those switches, but I don't think you need them, it looks like they are only to change extensions.
To compile you probably just type

&lt;name of compiler&gt; &lt;name of text file with .cpp extension&gt;

and it should compile.
Linking is when you have separate cpp files, for example if you had a bunch of different classes, and included them with include statements, then they would be linked.(most easily with a make file)

So, for the basic hello world program, and most of the beginning ones, you shouldn't need to link them. Just compile, and then run them.
good luck.
Maybe I'll pull out my c++ book again and see what other help I can be. http://www.sysopt.com/forum/smile.gif
dragonB

Female
07-25-2001, 11:00 PM
I tried this:

&lt;bcc32.exe&gt; &lt;c:\my documents\borland\bcc55\bin\firstcprog.cpp&gt; Nothing happened.

It's a matter of principle now! No way am I giving up on this stupid simple little task....!!!! I am beating myself up over this. LOL.

I will study Java also, but I still want to learn C. I noticed the recommendation for Java and I'll check it out.

What am I missing here? I need an action command to make it compile. "Compile darn you!!!"?? No...that's not it.... LOL

Female
07-25-2001, 11:02 PM
Kaotic...I have that help file thanks. I don't understand it. I guess I need the book. Any more suggestions please? Thanks a lot!

Rhino302
07-26-2001, 12:58 AM
Ok Female, it looks like you have the name of your compiler. You need to try typing it without the .exe extension. Also just go to the my documents directory in dos. But you also need to make sure your path is correct. Try typing 'path' in your DOS window. It should say path=.......
It should be the directory where your compiler file is located. FOr example, if it was c:\program files\borland\bin\
, you would need to type path=c:\program files\borland\bin


Also Female, if you have a scanner, the installed software may interfere. It has been mine and others experiences that it changes the classpath (not just path), and you have to change it to get it to work.

[This message has been edited by Rhino302 (edited 07-26-2001).]

Wilan Wong
07-26-2001, 05:21 AM
I just tried using the Borland C++ Compiler.. and so far it half works, it can compile, but with errors.. I'm not used to how it links/compiles things, 'cos i use Kdevelop mainly in Linux instead of using Windoze. How do I include header files such as &lt;stdio.h&gt;?? BTW, female, have u make sure that the extension are .c or .cpp, view the entire file extension and then rename them once u have saved it.

Female
07-26-2001, 05:41 AM
Rhino302
No, I don't have a scanner.
It sounds like this isn't going to be easy.
What is C++ Builder all about? Is it a downloadable freebie too?
Thanks.

This is not going as smoothly as I anticipated...I thought I'd be up to my neck learning code by now. LOL
Thanks too Wilan. I'll watch the ext's.

Female
07-26-2001, 08:16 AM
qball
Could you please help me get past this hurdle? Thanks!!!

dragonB
07-26-2001, 10:59 AM
Hi,
Here's another site with books on it. This one has a great list of stuff! http://www.syndik.at/harald/regal/buecher/library.asp
You have to sign up and get a password, but it's free. The site is also based in Germany, but most is translated to english. Any trouble with the German just ask me. http://www.sysopt.com/forum/smile.gif

Female, I'm downloading the borland compiler now. Modem, so it'll be an hour or two. I think we are all determined to get this working. http://www.sysopt.com/forum/smile.gif
dragonB

Ka0ticMiND
07-26-2001, 11:08 AM
This is what they said in the help file, can anyone make anything of this, it looks pretty straight forward though...:


*********
The syntax for BCC32 is:

BCC32 [option [option...]] filename [filename...]

Where:

--Items enclosed in brackets are optional.
--option refers to the command-line options.
--filename refers to the source-code files you want to compile.

***************

-Ka0tic

[This message has been edited by Ka0ticMiND (edited 07-26-2001).]

Female
07-26-2001, 11:10 AM
DragonB
I received some tips for doing this and I will try them when I get home tonight. I can't wait. If it works, I'll pass it along ok?
Do you know the C code yet? You are ahead of me so a contest is not fair, but at least we can motivate each other and anyone else who cares to pick up the gauntlet! LOL.
Thanks a lot!

Ka0ticMiND
07-26-2001, 11:14 AM
whoa
i just thought of something
what if the compiler is like the ones on *nix systems, if you dont give you're compiled code a name, it just spits out "a.out", right?female, did you notice any new files in the directory after trying to compile?

-Ka0tic

qball
07-26-2001, 02:40 PM
dragonB wins the prize!

The readme.txt with the Borland compiler was insufficient and incorrect. Follow the last post, mine works (actually, I already have an old Turbo C compiler).

The advantage to the book is it will set the IDE (not command line) up for you. As posted much easier to use.

milkchaser,
I mean to say 'I diverge' as I refer to my thought process, not my prose. No worries mate.

If you thnk learning Java is easier than C, try this:

Write a program that prompts the user for a number between 1 and 999. Validate input. Now loop creating a random number between 1 and 999. Check against input, continue looping until you match. When a match occurs, stop loop and output result to user in the form of "It took 657 guesses to match your number:111".

Not very hard program is it? I can do in both Java and C. The C program will be fairly straight forward and easy to follow and explain to a beginner. The Java program will not.

In fact code it yourself in java and see how 'simple'.

anyway, Female, good luck and keep trying.

Female
07-26-2001, 08:09 PM
Thanks DragonB
Whew! Got it to run!
I encountered two things.
1) I was told to put a getch() before return 0, but ended up having to use getchar() instead (looked in glossary).
It makes it wait for a keystroke to proceed so you can see it.

2) I was told to put in the bcc32.cfg file the line -n"Path to output folder" but when I created a new folder in c:\borland\bcc55\bin called "output" and set that path, it gave an error message. I'd like to be able to have an output folder to gather all my experimentational programs and tutorial lesson results. Any ideas?

BTW I am using DOS. Is that what you did too?

This was great fun! It is VERY similar to JAVA 2, as least the tiny bit I have seen so far. I hope to learn them both eventually.

Thanks for your help! Which program languages do you know already?

qball
07-26-2001, 08:26 PM
Write a program that prompts the user for a number between 1 and 999. Validate input. Now loop creating a random number between 1 and 999. Check against input, continue looping until you match. When a match occurs, stop loop and output result to user in the form of "It took 657 guesses to match your number:111".

Female
07-26-2001, 08:32 PM
LOL....
Yes, boss!
Sure wish I had that book now, qball.

Give me a week?
Thanks for everything. http://www.sysopt.com/forum/smile.gif

dragonB
07-27-2001, 01:44 AM
Wahoo! I got your helloworld program to work.

From the readme file...//my comments added

2. From the bin directory of your installation:
a. Add "c:\Borland\Bcc55"
to the existing path

//type this, or put in autoexec.bat
//set PATH="c:\Borland\Bcc55\bin";
//notice the bin part!!! and leave off
// the ; if not in autoexec.bat


//Just create these files in notepad,
// and save with the .cfg extension. Put
//them in the bin directory!

b. Create a bcc32.cfg file which will set
the compiler options for the Include
and Lib paths (-I and -L switches to
compiler) by adding these lines:
-I"c:\Borland\Bcc55\include"
-L"c:\Borland\Bcc55\lib"
c. Create an ilink32.cfg file which will set
the linker option for the Lib path by
adding this line:
-L"c:\Borland\Bcc55\lib"

It worked for me.
Then go to the directory where you have the program saved as a .cpp file
and type
bcc32 helloworld.cpp

It compiles and links it, and creates a helloworld.exe in your directory.
Run that and walla!
Oh, it's better to be in a dos window and type helloworld to run it. If you just double click, it usually disappears before you can even read anything.

Good luck,
dragonB

p.s. make sure you change any of those paths if you installed to the non default directory.(like I did)

johnqp
07-28-2001, 04:11 PM
This is great! I've been searching for info on how to use the IDE's and links to help sites - I've been lurching through Borlands 5.0 C++ ide that came with a development kit. Once I got used to it, I found it easy to use.
If I were you Female I would check out those mom and pop computer shops around town. I picked mine up for $25 CDN and I've come across several of them in other shops. It comes in a box, like software, and includes a teach yourself c (not c++) book and a cd with several on-line books - Sorry, I've forgotten the exact title but I think its "Borlands C++ 5.0 programming kit"
I'm using "Teach yourself C++ in 21 days" from SAMS publishing - It's great - found chpt 6 (basic classes) a little confusing but over all I found c++ similar in some ways to machine language programming (motorola brand)which I was introduced to in college but like qball demonstrates above, c++ is superior for its size and power of program flow control.

Demonknight - keep at it! Once the penny drops you'll start flying!

dragonB - referring to: "Run that and walla!"
If I could enlighten with out insulting, its: "Vois la!" not "walla" (French for "See there!")

Good luck Female

[This message has been edited by johnqp (edited 07-28-2001).]

Female
07-28-2001, 06:25 PM
Thanks John
This weekend I am playing with HTML. I saw how to make a webpage and save it to desktop and then play with it. It's good for practice and then you can delete it. Once I get familiar with the tags I'll upload my new page to replace my basic one I have now.

I'll do some online C or C++ tutorials till my book comes. If you have to change to look up the title and other info. on your package please let me know. How far along are you on the 21 chapters? I'm also reading the help file of the Borland compliler to get familiar with commands.

dragonB
07-28-2001, 07:46 PM
lol, no offense taken.
My brother is the french speaker in the family. I'm the German one(lived there for 2 years. http://www.sysopt.com/forum/smile.gif )
keep at it Female, also, I would concur that the ide's work well, but it helps to get a handle on things first, and then use those for graphical things. I would think learning complex stuff like pointers and overloading would be harder within an ide.(there's so much else to distract you...)
dragonB

Wilan Wong
07-28-2001, 10:39 PM
Female, go to www.informit.com (http://www.informit.com) there are a few tutorial books there as well, they are quite good. I think those versions are a bit cut-down from the Sam's teach yourself C in 21Days/24Hours books.

Female
07-29-2001, 08:25 AM
DragonB...can you explain what IDE is in simple terms? I read the definition but don't get it. Thanks.

Wilan...thank you very much. I will take you up on that and do those tutorials. I appreciate it!

What are you guys into these days? My husband is going to be doing 3d animimation.

dragonB
07-30-2001, 01:27 AM
An IDE in this case is a visual programming environment.
I've used Visual Basic, so I'll describe it. You start with a form, and place different controls on that form.(different than a html form, just think blank piece of paper)
For example, you put labels, textboxes, buttons etc or more advanced controls like database controls, and filesystem controls.
You then set properties on these controls. Like label, you would set the text to be displayed, or text box ditto.
Then you would start to write code. You then write to events, like if the text in the text box is changed, or the text box loses focus, do something. Or when buttons are pushed, etc.
So, basically this makes doing any type of graphical work WAY easier.

Hmm, reading over this, that's a pretty weak description, but it might give you a basic idea. I'm sure qball will help us out... http://www.sysopt.com/forum/smile.gif
cya dragonB

qball
07-30-2001, 04:18 PM
IDE - Integrated Development Environment

Basically the IDE is a program that developer use to make development easier. There are two types, text based and GUI (visual).

Text based have simple file/text editing. You start the program (IDE), open/create a program source code file. You can then save, run, debug, link, build, etc, from the IDE. For example, your hello java file, you did not use an IDE. You used notepad and then the command line to compile and run. For simple java programs, Textpad (a most bodacious text editor) works effectively as an IDE. I can open multiple .java files and compile and run them all from Textpad. IDE are easier to use than a text editor and command line compiler.

Now GUI IDEs. First a little knowledge. The 'Visual' in Visual Basic, Visual C++, Visual Pascal, etc. Refers to the IDE being a GUI! Powerbuilder and Delphi are common other GUI IDEs, and too many java IDEs to list. In short form, a GUI IDE is well like a GUI IDE. Basically, you have some sort of explorer interface to open source code and maintain files and projects and then workspaces where you can do visual component development, DB stuff, write code, object manipulation. Well, just tain't easy to explain. Thought the GUI IDEs are the most powerful and allow you to get a lot done quickly.

Hope this helps.

dragonB
07-30-2001, 10:58 PM
thanks q, I knew I was missing something there...lol, like that ide doesn't have to be visual. http://www.sysopt.com/forum/smile.gif
Anyway, for a text example, I use Jpad for java. You can compile within it, and it colors things nicely.
dragonb

Female
07-31-2001, 01:03 AM
Huh?
Whew....
That flew right over my head DragonB. LOL.
But if I try to take it in slowly it may make sense to me. You put graphics and labels/instructions on a page and then program them to perform functions. For instance, I use Quickbooks accounting software all the time and each page has features to post an entry to a selected account, or create a report, or edit, or delete, etc. The power to be able to do that would be awesome! Did I get the idea? Does regular (non-ide) programming not have graphics? If not, what does it consist of in its final format...all text? Is an IDE what you would call a higher platform? It's all really based on DOS isn't it? Is Windows an IDE? I really need to learn the jargon. Thanks for your patience.
Female in distress....haha http://www.sysopt.com/forum/smile.gif

Female
07-31-2001, 07:32 PM
Thanks qball, that's a great lesson you have given me here. The cheque is in the mail. LOL. Will I be working with Visual C++, or C++, or is that the same?
I appreciate your help gentlemen, and I look forward to creating my first little program.

qball
07-31-2001, 10:04 PM
see answer to first post.

johnqp
08-08-2001, 07:39 PM
Sorry I took so long getting back to you.
As for where I am in the book - Chapt 7 "more program flow" (loops etc.) which is a lot easier than chpt 6 "basic classes" I got confused when they started talking about classes as other classes member data. But I got the basic idea.
I'm sorry Female, I threw out the box. If I see one again I'll take down the info.
Good Luck,
JQP

Female
08-18-2001, 04:15 PM
Still waiting for my book, and enjoying the summer. This fall I will be heavily into this project.