|
-
October 27th, 2010, 12:20 AM
#1
using namespace std; causing declaration syntax error
I am using Turbo C version 3.0, see the following code,
when compiled, causes declaration syntax error
#include<iostream.h>
#include<conio.h>
#include<fstream.h>
using namespace std;
int main()
{
//using namespace std;
ofstream f;
clrscr();
f.open ("ittuz.txt");
cout<<"Created";
f<<"This is a file generated by c++ pgm \n ";
f<<"by /n /t Ajmal thagha Muhammed";
cout<<"Wrted to file";
f.close();
cout<<"closed";
getch();
return 0;
}
-
October 27th, 2010, 08:59 AM
#2
Re: using namespace std; causing declaration syntax error
Turbo C++ 3.0 was released in 1991. Get rid of it, that compiler won't tell you anything about the right way to program modern C++. The language has evolved since then.
Also, this is the "Managed C++" forum, which is actually yet another language, so you're in the wrong place regardless.
-
November 1st, 2010, 04:22 AM
#3
Re: using namespace std; causing declaration syntax error
I suggest using Visual Studio 2010 Express http://www.microsoft.com/express/Downloads/.
-
November 5th, 2010, 06:54 PM
#4
Re: using namespace std; causing declaration syntax error
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|