// operating with variables
#include <iostream>
usingnamespace std;
int main ()
{
// declaring variables:
int a, b;
int result;
// process:
a = 5;
b = 2;
a = a + 1;
result = a - b;
// print out the result:
cout << result;
// terminate the program:
return 0;
}
I get an error message saying:
1. unable to open file ISOSTREAM
2. declaring syntax error (doesnt recognize namespace std)
3. undefined symbol "cout" in function main()
do i have to download a file? what do i need to download and where do i put it? because i downloaded iostream.zip but not sure where to put the files or even if thats what i need
It's probably best you don't copy paste code, you should type and compile so you get used to the syntax. What tutorial are you following? If your interested in programming, you should go to local library and borrow a newish book for beginners, or Go buy a new book.
Either your install is not correct or something is wrong about how you are using the compiler...
BCC 4.5 is "antique software", and pre-standard C++. I recommend you get rid of it and instead install the latest Turbo C++ Explorerhttp://www.turboexplorer.com/
To compile your code in BDS, start a new console application and cut and paste your code.
From the command prompt, simply cd to your program's directory and type
bcc32 myprog.cpp
(where "myprog.cpp" is the name of your cpp file).
alright cool thanks! I did what both of u said and i also installed textpad. Only thing is, the older version had a text editor and I was also able to open the .exe files by just double clicking on them instead of having to always use command prompt. What would i need to download/install to be able to do that again?
edit: do i need visual c++ or c++ builder? or neither? lol