954,535 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

my #include <string> wont make "string" bold

Hello,
Can you please assist, why my Dev C++ program, wont see that I am trying to introduce the string library? Eaxmple:

#include <iostream>
#include <string.h>
using namespace std;
...
...
...
int id;
    string name;
    int item;
    float cost;


int is bold, float is bold, but string is not...
Can someone give me an idea why?

I also tried <string.h> .

Thanks for your assistance!

newgurl
Light Poster
30 posts since Apr 2006
Reputation Points: 10
Solved Threads: 0
 

Although it wont make it bold, I just realised it still uses it. So library is called after all. Sorry to waste anyone's time.

newgurl
Light Poster
30 posts since Apr 2006
Reputation Points: 10
Solved Threads: 0
 

Keywords: bold. Library types: normal.

And std::string is from <string> , not <string.h> .

Dave Sinkula
long time no c
Team Colleague
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
 

Try

#include <string>

string.h is not meant for 'C++strings', it is for char* or 'C-strings'

WaltP
Posting Sage w/ dash of thyme
Moderator
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You