LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 03-15-2006, 02:03 AM   #1
lucky6969b
Member
 
Registered: Nov 2005
Posts: 337

Rep: Reputation: 30
Standard Template Library Reference (std::string)


src/packet.cpp: In member function ‘bool MyPacket::CheckHeader()’:
src/packet.cpp:96: error: ‘struct std::string’ has no member named ‘SetAt’
src/packet.cpp:97: error: ‘struct std::string’ has no member named ‘SetAt’
make: *** [packet.o] Error 1

I used to attach to a website which displayed a very nicely ruled-out format of reference of the standard template library. And I forgot where I found it. Somethin' that can solve the errors above. Thanks for any hints
Jack
 
Old 03-15-2006, 02:53 AM   #2
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 47
* http://www.cppreference.com/ for an overview
* http://www.sgi.com/tech/stl/table_of_contents.html for a very formal technical reference

string (indeed) has no "SetAt"

Last edited by spooon; 03-15-2006 at 02:55 AM.
 
Old 03-15-2006, 08:32 AM   #3
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
to change a char you have ::replace and also operator []

the easiest way.
string s = "hello";
s[0] = 'X';
 
Old 03-15-2006, 03:09 PM   #4
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Just FYI -

"setAt()" is a Microsoft thing; it has to do with the Microsoft-specific/MFC "CString" class, not the standard C++ "string" class.

If your code has one Microsoft dependency, it's likely that sooner or later you'll encounter others, too.

Also (not applicable to this post), please use the "[Edit]" button to change your mind about a posting (don't just create a new posting if you don't need to), and please use the "[code]" tags to delimit source code (it makes it *so* much easier to read - and so much less unappealing to answer the question ;-))

Thanx in advance .. PSM
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SIGSEGV for std::string dragondad Programming 2 02-05-2006 11:26 AM
std::string in write lucky6969b Programming 2 12-20-2005 10:53 PM
Can't use template with std::map astorm Programming 3 11-03-2005 06:55 PM
C++ std::string to int Slaxx Programming 1 10-30-2004 10:03 PM
std string class and printf The_Nerd Programming 3 06-28-2004 10:46 PM


All times are GMT -5. The time now is 08:20 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration