468,512 Members | 1,423 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,512 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 3771
weaknessforcats
9,207 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>
  4.  
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
questionit
553 512MB
Hi

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)

Regards
Qi
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
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.