Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

include <string> in c++

Status
Not open for further replies.

parames

MIS
Jun 26, 2000
71
MY
Hi list,
I'm using Turbo c++ version 4.5.
I don't have the <string> header file. I just have <string.h> which is used for c programs. So, i couldn't run this type of programs :

#include <iostream.h>
#include <string>
int main()
{
string stA = &quot;Nutcracker&quot;,
stB = &quot;Sleeping Beauty&quot;,
stC = &quot;Swan Lake&quot;;

cout << &quot;Length of stringA = &quot; << stA.length() << endl;
cout << &quot;Length of stringB = &quot; << stB.length() << endl;
cout << &quot;Length of stringC = &quot; << stC.length() << endl;
}

SO, Can anybody send me this header file, please....

my email address is
1) parames@mpmsb.com
2) parames88@hotmail.com

thanks a lot..
Best Regards,
Parameswari Sellaparma
 
<string.h> should work with C++ fine. Turbo C++ predates the standard C++ by several years so you won't have the STL that includes <string>. SGI did have a version of STL that would work with older Borland compilers. Check their site.
James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that they think I am now
qualified to do anything with nothing.
 
Also check for <cstring.h> in Turbo C++.

James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that they think I am now
qualified to do anything with nothing.
 
I am pretty sure that just the header will not suffice.

I recommend downloading the Borland C++ compiler from the
and follow the
links for C++ compiler. The version is 5.5. You will
need to fill out a registration form.

Alternatively, you can go to and download
the DEV-C++ application. This comes with the GNU Debugger,
DEV-C++ IDE and the MinGW version of the GNU compiler which
includes C++.

Happy C++ing :>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top