Click here to Skip to main content
15,904,024 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CMFCRibbonComboBox Pin
Victor Nijegorodov12-Jan-21 10:12
Victor Nijegorodov12-Jan-21 10:12 
GeneralRe: CMFCRibbonComboBox Pin
Member 1325158812-Jan-21 16:23
Member 1325158812-Jan-21 16:23 
GeneralRe: CMFCRibbonComboBox Pin
Victor Nijegorodov12-Jan-21 21:07
Victor Nijegorodov12-Jan-21 21:07 
GeneralRe: CMFCRibbonComboBox Pin
Richard MacCutchan12-Jan-21 21:24
mveRichard MacCutchan12-Jan-21 21:24 
QuestionC Programming code to build an echo varient that hopefully can be used in WinXP Pin
jackngill11-Jan-21 10:49
jackngill11-Jan-21 10:49 
QuestionRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
David Crow11-Jan-21 16:36
David Crow11-Jan-21 16:36 
AnswerRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
jackngill11-Jan-21 22:25
jackngill11-Jan-21 22:25 
AnswerRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
Richard MacCutchan11-Jan-21 22:36
mveRichard MacCutchan11-Jan-21 22:36 
GeneralRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
jackngill11-Jan-21 22:58
jackngill11-Jan-21 22:58 
GeneralRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
Richard MacCutchan11-Jan-21 23:09
mveRichard MacCutchan11-Jan-21 23:09 
GeneralRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
jackngill11-Jan-21 23:15
jackngill11-Jan-21 23:15 
GeneralRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
Richard MacCutchan11-Jan-21 23:55
mveRichard MacCutchan11-Jan-21 23:55 
GeneralRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
jackngill12-Jan-21 9:46
jackngill12-Jan-21 9:46 
GeneralRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
Richard MacCutchan12-Jan-21 21:32
mveRichard MacCutchan12-Jan-21 21:32 
GeneralRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
jackngill13-Jan-21 5:24
jackngill13-Jan-21 5:24 
GeneralRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
Richard MacCutchan13-Jan-21 1:50
mveRichard MacCutchan13-Jan-21 1:50 
GeneralRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
jackngill13-Jan-21 5:26
jackngill13-Jan-21 5:26 
GeneralRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
Richard MacCutchan13-Jan-21 5:36
mveRichard MacCutchan13-Jan-21 5:36 
GeneralRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
jackngill14-Jan-21 12:04
jackngill14-Jan-21 12:04 
GeneralRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
jackngill15-Jan-21 23:59
jackngill15-Jan-21 23:59 
QuestionMFC: Most recently used (MRU) files Pin
Member 1325158810-Jan-21 18:18
Member 1325158810-Jan-21 18:18 
AnswerRe: MFC: Most recently used (MRU) files Pin
Victor Nijegorodov10-Jan-21 21:28
Victor Nijegorodov10-Jan-21 21:28 
GeneralRe: MFC: Most recently used (MRU) files Pin
Member 1325158810-Jan-21 22:11
Member 1325158810-Jan-21 22:11 
GeneralRe: MFC: Most recently used (MRU) files Pin
Victor Nijegorodov10-Jan-21 23:09
Victor Nijegorodov10-Jan-21 23:09 
QuestionReading the Whole Array of Data from JSON Pin
Litu Sahoo10-Jan-21 4:55
Litu Sahoo10-Jan-21 4:55 
Hi
I want the array of data under items, using this code i am able to get only the value under the first structure of data under items. How can i loop to the second structure of data under items, and further more if present. I am doing this using boost in c++.

Can someone help on this.

items=root.get_child("Serial");
for (boost::property_tree::ptree::iterator itprop = items.begin(); itprop != items.end(); ++itprop)
{
for(boost::property_tree::ptree::iterator it1=itprop->second.begin();it1!=itprop->second.end();++it1)
{
if(it1->first=="Items")
{
boost::property_tree::ptree& rootschild=it1->second;
cout<<"Size is "<<rootschild.size()<<"\n";
for(boost::property_tree::ptree::iterator="" it2="rootschild.begin();it2!=rootschild.end();++it2)
" {
="" it3="it2-">second.begin();it3!=it2->second. end();++it3)
{
std::cout<<it3->first<<": "<<it3->second.get_value<string>()<<"\n";
}
}
}

{
"Header": {
"Name": "abcd",
"Email": "xyz"
},
"Serial": [{
"flavour": "Green",
"Color": "9",
"code": "103",

"Items": [{
"date": "2020/11",
"value": "3.5",
"serial": "01"
}, {
"date": "2020/10",
"value": "3.4",
"serial": "03"
}]
}]
}

With Regards

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.