Guest_imported
New member
- Jan 1, 1970
- 0
Hi guys, what is the difference bewteen Borland C++ and Standard C++? I am currently learning how to program C++ reading a book called Standard C++. However i cannot go beyond the first page of the book cause the following code below will not run.
#include <iostream>
int main()
{ int i =10, j=20;
int k = (i+j)/2;
std::cout << "i is " <<i
<< " and j is " << j << std::endl;
std::cout << "average is " << k
<< std::endl;
return 0;
}
the error msg is "Qualifier 'std' is not a class or namespace name." I do know that standard C++ is a standard language that is not owned by any of the major compiler developers. Does that mean that Borland C++ 5.02 cannot support the std::cout functions? Shouldn't such compilers support Standard C++? Why is there such differences? makes learning C++ so difficult for a newbie like me.
Also wat is the difference between Borland C++ 5.02 and Borland Turbo C++ 4.5? Why is one called Turbo C++ and the other is not? Will Turbo C++ 4.5 support std::cout?
Lastly, is it possible to program plain old C programs using a C++ compiler? how do i do that and if C++ is a superset of C then y shld pple learn C anymore?
Sorry for so many questions and it would be great if somone could help me with these questions.
Thanks,
John
#include <iostream>
int main()
{ int i =10, j=20;
int k = (i+j)/2;
std::cout << "i is " <<i
<< " and j is " << j << std::endl;
std::cout << "average is " << k
<< std::endl;
return 0;
}
the error msg is "Qualifier 'std' is not a class or namespace name." I do know that standard C++ is a standard language that is not owned by any of the major compiler developers. Does that mean that Borland C++ 5.02 cannot support the std::cout functions? Shouldn't such compilers support Standard C++? Why is there such differences? makes learning C++ so difficult for a newbie like me.
Also wat is the difference between Borland C++ 5.02 and Borland Turbo C++ 4.5? Why is one called Turbo C++ and the other is not? Will Turbo C++ 4.5 support std::cout?
Lastly, is it possible to program plain old C programs using a C++ compiler? how do i do that and if C++ is a superset of C then y shld pple learn C anymore?
Sorry for so many questions and it would be great if somone could help me with these questions.
Thanks,
John