I have a task to do about the std::string datatype.

To do the task I need to Use KDevelop and be able to find the size of the buffer being used when performing operations upon strings, but never having used KDevelop before, I'm at a complete loss.

Could anyone be so kind as to give me some direction as how to go about viewing a buffer which is in use? Can it's contents be viewed within a window of the IDE, or would I have to call functions to 'cout' details about the buffer being used?

I'm at a complete loss about this, so any info is really appreciated.

Many many thanks.

may be u can display using cout as

string str;
char *buf = (char *)&str;
/*u need to know the size of 'str'*/
/*sizeof(str) might work but m not sure about it*/
int i;
for(i=0;i<sizeof(str);i++)/*considering sizeof() works*/
    cout<<(unsigned short)*(buf+i)<<",";

I dont know any feature in KDev for displaying the buffer coz I never worked in that. :)

Hope that helps a bit.

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.