Click here to Skip to main content
15,889,462 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Apparently different behaviour assigning C string to std::string, for Relese/Debug Pin
piul10-Aug-14 21:39
piul10-Aug-14 21:39 
AnswerRe: Apparently different behaviour assigning C string to std::string, for Relese/Debug Pin
Richard MacCutchan8-Aug-14 5:57
mveRichard MacCutchan8-Aug-14 5:57 
AnswerRe: Apparently different behaviour assigning C string to std::string, for Relese/Debug Pin
«_Superman_»8-Aug-14 18:58
professional«_Superman_»8-Aug-14 18:58 
GeneralRe: Apparently different behaviour assigning C string to std::string, for Relese/Debug Pin
piul10-Aug-14 21:42
piul10-Aug-14 21:42 
QuestionHow to design (and do I want) an API? Pin
piul6-Aug-14 2:31
piul6-Aug-14 2:31 
AnswerRe: How to design (and do I want) an API? Pin
Espen Harlinn6-Aug-14 2:55
professionalEspen Harlinn6-Aug-14 2:55 
GeneralRe: How to design (and do I want) an API? Pin
piul6-Aug-14 2:59
piul6-Aug-14 2:59 
GeneralRe: How to design (and do I want) an API? Pin
Espen Harlinn6-Aug-14 3:09
professionalEspen Harlinn6-Aug-14 3:09 
Something structured somewhat like this:
class ConfigEntry
{

};

class ConfigNode : public ConfigEntry
{
  typedef std::map<std::string,std::shared_ptr<ConfigEntry> > EntryMap;
  EntryMap entryMap_;

}; 

class ConfigValue : public ConfigEntry
{
};

class StringConfigValue : public ConfigValue
{
  std::string value_;
};

class IntConfigValue : public ConfigValue
{
  int value_;
};



class ConfigFile : public ConfigNode
{
}; 

This way the EntryMap can hold std::string, int and nested ConfigNode objects.
Espen Harlinn
Chief Architect - Powel AS

Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra

AnswerRe: How to design (and do I want) an API? Pin
Cristian Amarie14-Aug-14 22:16
Cristian Amarie14-Aug-14 22:16 
QuestionConvert console to windows gui application Pin
Member 109951396-Aug-14 0:12
Member 109951396-Aug-14 0:12 
AnswerRe: Convert console to windows gui application Pin
Richard MacCutchan6-Aug-14 1:06
mveRichard MacCutchan6-Aug-14 1:06 
AnswerRe: Convert console to windows gui application Pin
Joe Woodbury6-Aug-14 15:38
professionalJoe Woodbury6-Aug-14 15:38 
AnswerRe: Convert console to windows gui application Pin
Cristian Amarie17-Aug-14 19:33
Cristian Amarie17-Aug-14 19:33 
Questionwhat is zed doing here? Pin
Alex Sturza5-Aug-14 8:29
Alex Sturza5-Aug-14 8:29 
AnswerRe: what is zed doing here? Pin
CPallini5-Aug-14 10:02
mveCPallini5-Aug-14 10:02 
GeneralRe: what is zed doing here? Pin
Alex Sturza5-Aug-14 10:46
Alex Sturza5-Aug-14 10:46 
GeneralRe: what is zed doing here? Pin
CPallini5-Aug-14 20:48
mveCPallini5-Aug-14 20:48 
AnswerRe: what is zed doing here? Pin
jeron15-Aug-14 11:17
jeron15-Aug-14 11:17 
GeneralRe: what is zed doing here? Pin
Alex Sturza5-Aug-14 11:28
Alex Sturza5-Aug-14 11:28 
GeneralRe: what is zed doing here? Pin
jeron15-Aug-14 11:41
jeron15-Aug-14 11:41 
GeneralRe: what is zed doing here? Pin
Alex Sturza5-Aug-14 11:46
Alex Sturza5-Aug-14 11:46 
AnswerRe: what is zed doing here? Pin
Pete O'Hanlon5-Aug-14 12:27
mvePete O'Hanlon5-Aug-14 12:27 
GeneralRe: what is zed doing here? Pin
Alex Sturza6-Aug-14 4:12
Alex Sturza6-Aug-14 4:12 
GeneralRe: what is zed doing here? Pin
Pete O'Hanlon6-Aug-14 5:31
mvePete O'Hanlon6-Aug-14 5:31 
Questionin this code,where is called database_close?pls help Pin
Alex Sturza5-Aug-14 6:19
Alex Sturza5-Aug-14 6:19 

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.