<?xml version="1.0" ?>
- <Project name="gaurav">
- <Newtask name="kumar">
- <subtask name="suchan">
  <Application name="Ravi" />
  <File name="ghhjh" />
  <Purpose name="hhd" />
  <taskStatus name="hsdd" />
  <Notes name="jjkj" />
  </subtask>
- <subtask name="suchan1">
  <Application name="Ravi" />
  <File name="ghhjh" />
  <Purpose name="hhd" />
  <taskStatus name="hsdd" />
  <Notes name="jjkj" />
  </subtask>
- <subtask name="suchan2">
  <Application name="Ravi" />
  <File name="ghhjh" />
  <Purpose name="hhd" />
  <taskStatus name="hsdd" />
  <Notes name="jjkj" />
  </subtask>
  </Newtask>
- <Newtask name="kumar1">
- <subtask name="suchan3">
  <Application name="Ravi" />
  <File name="ghhjh" />
  <Purpose name="hhd" />
  <taskStatus name="hsdd" />
  <Notes name="jjkj" />
  </subtask>
- <subtask name="suchan4">
  <Application name="Ravi" />
  <File name="ghhjh" />
  <Purpose name="hhd" />
  <taskStatus name="hsdd" />
  <Notes name="jjkj" />
  </subtask>
- <subtask name="suchan5">
  <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
class CTask
{
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);
///unhandled exception
   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++;
 }//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
ADVERTISEMENT
click here
Web Bug from http://us.adserver.yahoo.com/l?M=294855.5468653.6549235.3001176/D=groups/S=:HM/A=2376776/rand=928389019


Yahoo! Groups Links

Reply via email to