470,858 Members | 1,660 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,858 developers. It's quick & easy.

string datatype

hi actually i tried to use the string datatype in c++ on turbo 3.0 c++ complier
i had included even the #include<string.h>
and actually the header file is also present but during complation it is giving errors! plz help me!!!
Apr 12 '08 #1
2 3831
9,208 Expert Mod 8TB
string.h is for C and not C++.

To use the C++ stirng data type be sure to:

Expand|Select|Wrap|Line Numbers
  1. #include <iostream>
  2. using namespace std;
  3. #include <string>
C++ header file names do not have a .h extension. The C headers that have been modified for C++ have had the.h removed and a C added as the first letter. So <stdio.h> is now <cstdio>.
Apr 12 '08 #2
553 512MB

As far as i know, the 'string' data type is not available in Turbo C++ even if you save your file with .cpp extension instead of .c - the compiler will still generate error(s)

Apr 12 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

13 posts views Thread by Victor Hannak | last post: by
reply views Thread by Andrew Burgher | last post: by
5 posts views Thread by Barry | last post: by
25 posts views Thread by Bala2508 | last post: by
6 posts views Thread by =?Utf-8?B?ZGVlcGFr?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.