<?xml version="1.0" ?>
<Application name="Ravi" />
<File name="ghhjh" />
<Purpose name="hhd" />
<taskStatus name="hsdd" />
<Notes name="jjkj" />
</subtask>
<Application name="Ravi" />
<File name="ghhjh" />
<Purpose name="hhd" />
<taskStatus name="hsdd" />
<Notes name="jjkj" />
</subtask>
<Application name="Ravi" />
<File name="ghhjh" />
<Purpose name="hhd" />
<taskStatus name="hsdd" />
<Notes name="jjkj" />
</subtask>
</Newtask>
<Application name="Ravi" />
<File name="ghhjh" />
<Purpose name="hhd" />
<taskStatus name="hsdd" />
<Notes name="jjkj" />
</subtask>
<Application name="Ravi" />
<File name="ghhjh" />
<Purpose name="hhd" />
<taskStatus name="hsdd" />
<Notes name="jjkj" />
</subtask>
<Application name="Ravi" />
<File name="ghhjh" />
<Purpose name="hhd" />
<taskStatus name="hsdd" />
<Notes name="jjkj" />
</subtask>
</Newtask>
</Project>
-------------------------------------
this structure I have to store.So I made this data structure.
class CSubTask
{
string szApplicationName;
public:
string GetApplicationName()
{
return szApplicationName;
}
SetApplicationName(CString szApplication)
{
szApplicationName=szApplication;
}
};//end of subtask class
{
string szApplicationName;
public:
string GetApplicationName()
{
return szApplicationName;
}
SetApplicationName(CString szApplication)
{
szApplicationName=szApplication;
}
};//end of subtask class
class CTask
{
public:
int nTaskCount;
vector<CSubTask*>vectSubTasks;
};
class CProject
{
public:
vector<CTask*>vectTasks;
};
{
public:
int nTaskCount;
vector<CSubTask*>vectSubTasks;
};
class CProject
{
public:
vector<CTask*>vectTasks;
};
this is my data structure
-------------------------------------
this is the code I am using.Here hParent pointing to the root of tree.Application is giving runtime error
temp=m_treetest.GetItemText(hParent);
while(m_treetest.ItemHasChildren(hParent))
{
//get the task
hRoot=m_treetest.GetChildItem(hParent);
vectproj=new CProject;
vectproj->vectTasks.push_back((CTask*)nooftask);
nooftask++;
while(m_treetest.ItemHasChildren(hRoot))
{
int ii=0;
hSubRoot=m_treetest.GetNextItem(hRoot,ii);
tempSubData=m_treetest.GetItemText(hSubRoot);
while(m_treetest.ItemHasChildren(hParent))
{
//get the task
hRoot=m_treetest.GetChildItem(hParent);
vectproj=new CProject;
vectproj->vectTasks.push_back((CTask*)nooftask);
nooftask++;
while(m_treetest.ItemHasChildren(hRoot))
{
int ii=0;
hSubRoot=m_treetest.GetNextItem(hRoot,ii);
tempSubData=m_treetest.GetItemText(hSubRoot);
///unhandled exception
vectproj->vectTasks[nooftask]->vectSubTasks[subtaskno]->SetApplicationName
vectproj->vectTasks[nooftask]->vectSubTasks[subtaskno]->SetApplicationName
////////////////Please check it put and try to help me.see where I am doing wrong/////
(tempSubData);
subtaskno++;
ii++;
}//end of subtask
m_treetest.GetNextSiblingItem(hRoot);
nooftask++;
subtaskno++;
ii++;
}//end of subtask
m_treetest.GetNextSiblingItem(hRoot);
nooftask++;
}//end of parent while
thanks and Regards
Gaurav
Do you Yahoo!?
The all-new My Yahoo! � Get yours free!
To unsubscribe : [EMAIL PROTECTED]
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To reply to this message, go to:
http://groups.yahoo.com/group/Programmers-Town/post?act=reply&messageNum=4147
Please do not reply to this message via email. (more info)
- To visit your group on the web, go to:
http://groups.yahoo.com/group/Programmers-Town/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
