|
It seems that one of my previous replies/posts is under review for possible spam or at least at my end it is showing so. I do not understand why this is I have been reflecting over the content trying to think what may have triggered this, I'm not sure what would cause this reaction. Perhaps I need to contact a mod for clarification.
I think, I will need to check at further length Visual Studio 2017 works with XP but it depends on what vers of Dotnet is required I think Dot net framework Vers 4.0 was the last for XP
modified 13-Jan-21 11:43am.
|
|
|
|
|
Nothing showing here. When and if it does happen, just be patient. The automatic spam checker holds "suspect" messages in a queue. They are then reviewed by one of the many moderators here, and accepted or rejected as appropriate. Your messages may get picked up for spurious reasons, but it is a fairly intelligent system and will improve once it recognises you.
|
|
|
|
|
Richard,
Yes decided to leave the site alone for a while to allow the spam-bot thing do it's thing. I took the oppertunity to look into/do some research into Visual Studio & which version would be suitable with windows XP.
This info may help others who might find themselves here. The version you can install is dictated in the main by the Dot Net Framework version as Visual Studio requires the relevant dot net framework installed which in the case of Windows XP (last DotNet for XP) "DotNet framework version 4.0" it needs to be installed with your OS. Now I have trawled a few sites looking at what the latest version would be for Windows XPSP3 & it is "Visual Studio 2010" which is going back some when the current vers at the time of writing is 2019. I have found it quite difficult to grab a 2010 version as we are talking old School but I elected to download an offline iso version called OFFLINESOFTWARES.COM_VS2010Express.iso. Not content with just downloading it (which incidently is 693Mb) I have scanned the iso with 2 virus checkers to check for malware & viruses, I do not have any affiliation with the VStudio website it was just the first one which I was successful in downloading it from. I would post the link but I will need to check if it is permissable here first. I think fully installed needs 2.2Gb of your HDD space.
Anyway My little rant over where/which Visual Studio 2010 which may or may not help others now is concluded. I think I will need to clear some HDD space to install it as it needs a fair amount of space. Okay "if" "Else" it is then re not using goto statements
I have been undertaking some house keeping as I needed to clear some hard drive space to install Visual Studio Vers 2010. I have done so but it seems to be defaulting to C++ rather than "C" Will the editor accept "C" code rather than C++?
best Regards
|
|
|
|
|
Hi Richard
I think because I am working on a EOL OS (XP) I have been having lots of problems installing Visual Studio 2010 I think the problems exist because the OS & the development of VStudio 2010 have not made any progress since its conception & I think that is why it is not working.
I have alternatively installed Code::Blocks with some minor glitchs & needing some additional files to run under XP but it seems to be working correctly.
I went for the portable install so that if it is no good for some reason I can easily ditch. Code::Blocks seems to have continuing development for XP so it has the advantage of update progression.
I will keep you posted re developments
Best Regards 
|
|
|
|
|
Microsoft Visual C++ 2019. Windows 10, using MFC
Is there a nice step by step example of code showing how to use the MRU in a standard SDI application with ribbon and without document/view architecture?
My used files (*.jpg, *.bmp) are well stored in the MRU file list of the main menu of the ribbon.
But when I click on one of them I have an error in .../MFC/appui.cpp showing that ENSURE_VALID(m_pDocManager) failed, which is normal because I did not choose doc/view support.
Is there any way out, unless completely rewriting a new project with pDocManager?
Pierre
|
|
|
|
|
|
|
You are welcome!
|
|
|
|
|
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
|
|
|
|
|
What about something like:
serial_items = root.get_child("Serial");
items = serial_items.get_child("Items");
for (boost::property_tree::ptree::iterator itprop = items.begin(); itprop != items.end(); ++itprop)
... I don't use boost, nor have I tried to compile it, so this may or may not work.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
modified 10-Jan-21 15:04pm.
|
|
|
|
|
Hi,
Thank you for the reply, but the code is crashing in the below line.
David Crow wrote: items = serial_items.get_child("Items");
With Regards
|
|
|
|
|
Litu Sahoo wrote: ...but the code is crashing in the below line. What exactly does that mean?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Litu Sahoo wrote: Thank you for the reply, but the code is crashing in the below line.
David Crow wrote: items = serial_items.get_child("Items");
Did you debug your code? What is the value of
serial_items
before the "crash"?
|
|
|
|
|
hi
m_data is showing blank and m_children is showing an address.
|
|
|
|
|
Hi
I modified the program but still not able to get the whole array of data Under Items. Below is the sample code. Please let me know where it is wrong.
namespace pt=boost::property_tree;
pt::ptree root;
pt::ptree items;
pt::ptree obsrvtns;
pt::ptree obsrvtns1;
pt::read_json(filepath,root);
obsrvtns=root.get_child("Header");
cout<<"Header size is "<<obsrvtns.size()<<"\n";
for="" (boost::property_tree::ptree::iterator="" itprop="obsrvtns.begin();" !="obsrvtns.end();" ++itprop)
="" {
="" cout<<itprop-="">first<<": "<<itprop->second.get_value<string>()<<"\n";
}
items=root.get_child("Serial");
cout<<"Series Size is "<<items.size()<<"\n";
for(boost::property_tree::ptree::iterator="" it="items.begin();it!=items.end();++it)
" {
="" cout<<"second="" size="" is="" "<<it-="">second.size()<<"\n";
for(boost::property_tree::ptree::iterator it1=it->second.begin();it1!=it->second.end();++it1)
{
cout<<it1->first<<": "<<it1->second.get_value<string>()<<"\n";
if(it1->first=="Item")
{
/*obsrvtns1=it1->second.get_child("Items");
cout<<"check \n";*/
//BOOST_FOREACH(boost::property_tree::ptree::value_type &v,root.get_child("Header.Serial.Item"))
BOOST_FOREACH(boost::property_tree::ptree::value_type &v,root.get_child("Item"))
{
cout<
|
|
|
|
|
Can someone help to give some tips? Why I compiled the program without error, yet it cannot open the notepad to see my text file : testedit.txt in the file folder c:\AHome. Thanks.
#include <stdio.h>
#include <stdlib.h>
void main()
{
system("cd C:\\Windows\\System32\notepad.exe c:\\AHome\testedit.txt ");
return 0;
}
|
|
|
|
|
Try:
system("C:\\Windows\\System32\\notepad.exe c:\\AHome\\testedit.txt ");
Mircea
|
|
|
|
|
Thanks for your reply ...
I have try ...
system("C:\\Windows\\System32\notepad.exe c:\\AHome\testedit.text ");
The error massage is :
'C:\Windows\System32' is not recognized as Internal or External Command, Operable Program or Batch file.
|
|
|
|
|
You missed a backslash just before notepad.exe. You don't even really need the entire path to Notepad.
This will work just fine:
system("notepad C:\\AHome\\testedit.text");
|
|
|
|
|
Make sure you're not doing that from an elevated process.
It's not quite DLL hijacking, but if an attacker could write a rogue notepad.exe into the %PATH% somewhere, they could then get your process to launch it with elevated privileges.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
True
|
|
|
|
|
Could you help me to understand what do you mean by " elevated process "?
|
|
|
|
|
|
Goh Kak Ng wrote: system("C:\Windows\System32\notepad.exe c:\AHome\testedit.text ");
You missed one backslash in the path. It must be:
system("C:\\Windows\\System32\\notepad.exe c:\\AHome\\testedit.text ");
|
|
|
|
|
Yes. You are right!
Try this work ...
system("C:\\Windows\\System32\\notepad.exe c:\\AHome\\testedit ");
Note that the test file name must be " testedit " and not " testedit.txt ". Otherwise, this file will not be found.
Thanks!
|
|
|
|