Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Save & Open

Save & Open

Scheduled Pinned Locked Moved C / C++ / MFC
data-structures
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    suroor453
    wrote on last edited by
    #1

    i made a linked list of nodes...! but i need to save my list of nodes on hard disk... and i need to load this list when i open my program... (it is a phonebook program in console application)

    T X 2 Replies Last reply
    0
    • S suroor453

      i made a linked list of nodes...! but i need to save my list of nodes on hard disk... and i need to load this list when i open my program... (it is a phonebook program in console application)

      T Offline
      T Offline
      ThatsAlok
      wrote on last edited by
      #2

      suroor_bio wrote: it is a phonebook program in console application) Where exactly are you facing problem buddy :)

      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

      cheers, Alok Gupta

      1 Reply Last reply
      0
      • S suroor453

        i made a linked list of nodes...! but i need to save my list of nodes on hard disk... and i need to load this list when i open my program... (it is a phonebook program in console application)

        X Offline
        X Offline
        xiaohe521
        wrote on last edited by
        #3

        class Photo { std::string sName; std::string sPhoneNo; } class Photos { public: Photos(std::string sFileName) { //readFromFile } bool SaveToFile(std::string sFileName); private: list lstPhoto; } I love Programming

        S 1 Reply Last reply
        0
        • X xiaohe521

          class Photo { std::string sName; std::string sPhoneNo; } class Photos { public: Photos(std::string sFileName) { //readFromFile } bool SaveToFile(std::string sFileName); private: list lstPhoto; } I love Programming

          S Offline
          S Offline
          suroor453
          wrote on last edited by
          #4

          I want to save the entry details on the hard disk after entering it then when I open the programe again I want the details to be entered to the list again I APPROCIATE ANY HELP #include #include typedef CList PhoneBook; struct PhoneBookEntry { CString Name,phone; }; //***********************main************ switch (nChoice) { case 1: // add entry PhoneBookEntry *pEntry; pEntry = InputEntry(); g_PhoneBook.AddTail(pEntry); break; case 2: //list entries pos = g_PhoneBook.GetHeadPosition(); while (pos) { PhoneBookEntry* pEntry = g_PhoneBook.GetNext(pos); PrintEntry(pEntry); } } //*********************************** PhoneBookEntry* InputEntry() //func. to enter details { PhoneBookEntry* pEntry = new PhoneBookEntry; cout << "Enter new entry details:" << endl; cout << " Name: "; char cName[100]; gets(cName); cout << " Phone: "; char cOfPhone[100]; gets(cOfPhone); pEntry->Name = cName; pEntry->Phone = cOfPhone; return pEntry; } //**********************************************

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups