+ 1
Turbo C++ doesn't support namespace?
I have Turbo C++ on my laptop, but writing "using namespace std;" gives me an error saying "error in declaration syntax", on compilation How can it be wrong??
8 odpowiedzi
+ 7
Don't use Turbo C++:
https://www.sololearn.com/discuss/288609/?ref=app
+ 2
recently does not mean few years back , check this
https://en.cppreference.com/w/cpp/language/history
0
Turbo c++ is getting old , use Codeblocks IDE
0
Ok so the syntax "using" has been introduced recently?
0
yes
0
Bad practice :
include <iostream>
using namespace std;
void main(){
cout << "welcome to sololearn" << endl;
}
Good practice:
include<iostream>
void main(){
std::cout << "welcome to sololearn" << std::endl;
}
ofcourse both produce same result , you will understand later why am i telling you not to use namespace
0
ahh I see, too old
0
yes turbo c++ doesn't support namespace because it's compiler is different
use codeblock for writing code in c++