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!

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.

Keywords: bold. Library types: normal.

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


#include <string>

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.