View Single Post
  #2 (permalink)  
Old December 11th, 2006, 08:41 AM
Geo121 Geo121 is offline
Friend of Wrox
 
Join Date: Jan 2006
Posts: 103
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Geo121
Default

alrighty this has a pretty simple solution

the problem is that it can't find your iostream library (obviously as you have said already)

but that is the reason it doesn't recognize cout and endl

inside of that library header file it tells the compiler that in simplest words :

cout is a type of function that does a specific thing

(You will more about this later when you learn to write your own libraries =P )

so if you take care of the iostream error you will solve the problem

what I would suggest is that you make sure that your paths and class paths in your cmd prompt are set

this means :

1) your cmd line is where your source code is located
   ex : i have source code on my desktop so my cmd line should read
     C:\Documents and Settings\User\desktop>

2) your path is set to where your compiler.exe file is (probably bcc55.exe if you have Borland)
   ex : i have bcc55 in My Documents\Borland\bin so i will type this into my cmd line
     path="C:\Documents and Settings\User\My Documents\Borland\bin"

3) your classpath is set to where your libraries are
   ex : mine are in My Documents\Borland\lib so I will type this into my cmd line
     set classpath="C:\Documents and Settings\User\My Documents\Borland\lib"

basically each step says :

1) "This is where my code that needs to be compiled is"

2) "This is where my compiler is so you can reach it outside of it's directory"

3) "This is where my Libraries are so you can reach them outside of thier directory"

Try these steps if it still doesn't work then let me know otherwise here ya go

I also think that once you get comfortable using a compiler like borland

you can switch to a GUI that compiles and links for you so all you do is press a button

I would suggest BloodShed's program : dev C++

look it up and download it (IT'S FREE!)

~ Geo

 ~ You are unique, just like everyone else
Reply With Quote