to use .h or not to use .h that is the question
ok. in my c++ programmming class in highschool we use visual c++ 6.0 pro. and we use this book that comes with its own library. we added it to our library of header files.
well when i type code like this
Code:
#include <iostream>
#include <string.h>
int main()
{
String happy = "happy";
std::cout << happy;
return 0;
}
it gives me an error and say "cout" is ambigous. but when i write code like this:
Code:
#include <iostream.h>
#include <string.h>
int main()
{
String happy = "happy";
std::cout << happy;
return 0;
}
it doesnt give me an error. i know the new standard is without the .h because of namespaces, etc....can anyone help and explain to me why...also i cant do #include <string> it says file not found...why do i have to put a .h for string but not iostream?
thanks