Click here to Skip to main content
15,900,725 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionconverting str::string to const char* Pin
jon-8026-Aug-06 8:03
professionaljon-8026-Aug-06 8:03 
AnswerRe: converting str::string to const char* Pin
Pierre Leclercq26-Aug-06 8:34
Pierre Leclercq26-Aug-06 8:34 
GeneralRe: converting str::string to const char* Pin
Pierre Leclercq26-Aug-06 9:29
Pierre Leclercq26-Aug-06 9:29 
AnswerRe: converting str::string to const char* Pin
Waldermort26-Aug-06 8:59
Waldermort26-Aug-06 8:59 
GeneralRe: converting str::string to const char* Pin
fefe.wyx26-Aug-06 15:59
fefe.wyx26-Aug-06 15:59 
QuestionLoading drivers programmatically Pin
Still learning how to code26-Aug-06 6:58
Still learning how to code26-Aug-06 6:58 
AnswerRe: Loading drivers programmatically Pin
Gary R. Wheeler26-Aug-06 12:28
Gary R. Wheeler26-Aug-06 12:28 
GeneralRe: Loading drivers programmatically Pin
Still learning how to code27-Aug-06 1:42
Still learning how to code27-Aug-06 1:42 
Questionunicode strings Pin
Waldermort26-Aug-06 5:42
Waldermort26-Aug-06 5:42 
AnswerRe: unicode strings Pin
fefe.wyx26-Aug-06 6:32
fefe.wyx26-Aug-06 6:32 
GeneralRe: unicode strings Pin
Waldermort26-Aug-06 7:06
Waldermort26-Aug-06 7:06 
GeneralRe: unicode strings Pin
Pierre Leclercq26-Aug-06 8:55
Pierre Leclercq26-Aug-06 8:55 
GeneralRe: unicode strings Pin
Waldermort26-Aug-06 9:04
Waldermort26-Aug-06 9:04 
GeneralRe: unicode strings Pin
Pierre Leclercq26-Aug-06 9:49
Pierre Leclercq26-Aug-06 9:49 
GeneralRe: unicode strings Pin
Justin Tay26-Aug-06 10:08
Justin Tay26-Aug-06 10:08 
AnswerRe: unicode strings Pin
Mike Dimmick26-Aug-06 10:51
Mike Dimmick26-Aug-06 10:51 
GeneralRe: unicode strings Pin
Waldermort26-Aug-06 11:02
Waldermort26-Aug-06 11:02 
AnswerRe: unicode strings Pin
Michael Dunn26-Aug-06 21:37
sitebuilderMichael Dunn26-Aug-06 21:37 
GeneralRe: unicode strings Pin
Waldermort26-Aug-06 22:19
Waldermort26-Aug-06 22:19 
GeneralRe: unicode strings Pin
Michael Dunn26-Aug-06 22:52
sitebuilderMichael Dunn26-Aug-06 22:52 
QuestionLinked list of strings - how to? Pin
jon-8026-Aug-06 4:22
professionaljon-8026-Aug-06 4:22 
AnswerRe: Linked list of strings - how to? [modified] Pin
Dave Calkins26-Aug-06 5:39
Dave Calkins26-Aug-06 5:39 
when you declare the list variable you have to put the type inside the <>'s not the variable name. also you could probably just use the STL string class.

#include <list><br />
#include <string><br />
<br />
using std::list;<br />
using std::string;<br />
<br />
void main()<br />
{<br />
  string strName("Joe");<br />
<br />
  list<string> li;<br />
<br />
  li.push_back(strName);<br />
}


I think you're just confusing the variable type and the actual variable in your code. When you declare a list, the stuff in the <>'s (template arguments) are telling the list what type of variable you want it to hold. Then you can add variables of that type to the list.




-- modified at 11:45 Saturday 26th August, 2006
GeneralRe: Linked list of strings - how to? Pin
jon-8026-Aug-06 7:32
professionaljon-8026-Aug-06 7:32 
AnswerRe: Linked list of strings - how to? Pin
David Crow28-Aug-06 4:33
David Crow28-Aug-06 4:33 
Questionfloat to string Pin
Waldermort26-Aug-06 3:46
Waldermort26-Aug-06 3:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.