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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Visual C++

Visual C++

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
6 Posts 3 Posters 1 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.
  • J Offline
    J Offline
    John502
    wrote on last edited by
    #1

    At What Conditions, CStudioFile::ReadString() Gives/Returns the FALSE value? I know that,What is available in the MSDN , AnyBody Know the another Conditions Please, Tell me. And In a File Consists the Lines In one Condition "m_pString" doesn't take the line in the File? Why it Happen? Any body know Please give me Reply....

    M 1 Reply Last reply
    0
    • J John502

      At What Conditions, CStudioFile::ReadString() Gives/Returns the FALSE value? I know that,What is available in the MSDN , AnyBody Know the another Conditions Please, Tell me. And In a File Consists the Lines In one Condition "m_pString" doesn't take the line in the File? Why it Happen? Any body know Please give me Reply....

      M Offline
      M Offline
      Maximilien
      wrote on last edited by
      #2

      What make you think there are other condition than what is describe in the documentation ? Do you have a test case that will trigger a FALSE ? It returns FALSE (or NULL depending on which version you call) if no data is read before the end-of-file.

      John502 wrote:

      In a File Consists the Lines In one Condition "m_pString" doesn't take the line in the File?

      What does that mean : :confused:

      Watched code never compiles.

      J M 2 Replies Last reply
      0
      • M Maximilien

        What make you think there are other condition than what is describe in the documentation ? Do you have a test case that will trigger a FALSE ? It returns FALSE (or NULL depending on which version you call) if no data is read before the end-of-file.

        John502 wrote:

        In a File Consists the Lines In one Condition "m_pString" doesn't take the line in the File?

        What does that mean : :confused:

        Watched code never compiles.

        J Offline
        J Offline
        John502
        wrote on last edited by
        #3

        Hello Maxi, Thanks for helping in this regards; I want to run my test case on the below text; 12/13/10 10:11:00 (India Standard Time), [3484] TAPIAdapter.cpp :379 INFO - Closing the database before stopping the service. 12/13/10 10:11:00 (India Standard Time), [3484] TAPIAdapter.cpp :409 INFO - TAPIAdapterDynConfig thread could not be stopped 12/13/10 10:11:00 (India Standard Time), [3484] TAPIAdapter.cpp :429 INFO - "TAPIAdapter Service" Service Stopped 12/13/10 10:11:04 (India Standard Time), [3544] TSPConnector.cpp :166 TRACE - Line is closed for device_id 110 12/13/10 10:11:04 (India Standard Time), [3544] TSPConnector.cpp :166 TRACE - Line is closed for device_id 110 3_VOIP_10202010_00004 made on Oct 20 2010 16:41:29 12/13/10 10:11:00 (India Standard Time), [1508] TAPIAdapter.cpp :793 ERROR - Illegal keyword "CheckExtInCTIUserInterval" in configuration file 12/13/10 10:11:04 (India Standard Time), [1508] CVoipDatabase.cpp :167 INFO - KnoahSoftDB : Connection opened with database at ip address : 157.0.60.155 12/13/10 10:11:04 (India Standard Time), [4108] CCTIOSAdapterKSDB.c :142 TRACE - The SQL Query is :- select v.voip_phone_extension Voip_Phone_Extension,e.emp_code Emp_Code,e.emp_id Emp_ID,e.network_id Network_ID,s.site_alias Site_Alias From Employee E, Site S, Voice_Configuration V, Employee_Detail D Where V.Emp_Id = E.Emp_Id And V.Emp_Id = D.Emp_Id And D.Location_ID = S.Site_ID And V.Status = 'A' And V.Do_Voice_Recording = 'Y' And V.Voip_phone_extension != '-1' and v.emp_id not in (select e.emp_id from employee e where e.emp_first_name like 'extn_agent_%') order by voip_phone_extension I have this text content in one file and wants to read this by application; please help me out.. Thanks John;

        M 1 Reply Last reply
        0
        • J John502

          Hello Maxi, Thanks for helping in this regards; I want to run my test case on the below text; 12/13/10 10:11:00 (India Standard Time), [3484] TAPIAdapter.cpp :379 INFO - Closing the database before stopping the service. 12/13/10 10:11:00 (India Standard Time), [3484] TAPIAdapter.cpp :409 INFO - TAPIAdapterDynConfig thread could not be stopped 12/13/10 10:11:00 (India Standard Time), [3484] TAPIAdapter.cpp :429 INFO - "TAPIAdapter Service" Service Stopped 12/13/10 10:11:04 (India Standard Time), [3544] TSPConnector.cpp :166 TRACE - Line is closed for device_id 110 12/13/10 10:11:04 (India Standard Time), [3544] TSPConnector.cpp :166 TRACE - Line is closed for device_id 110 3_VOIP_10202010_00004 made on Oct 20 2010 16:41:29 12/13/10 10:11:00 (India Standard Time), [1508] TAPIAdapter.cpp :793 ERROR - Illegal keyword "CheckExtInCTIUserInterval" in configuration file 12/13/10 10:11:04 (India Standard Time), [1508] CVoipDatabase.cpp :167 INFO - KnoahSoftDB : Connection opened with database at ip address : 157.0.60.155 12/13/10 10:11:04 (India Standard Time), [4108] CCTIOSAdapterKSDB.c :142 TRACE - The SQL Query is :- select v.voip_phone_extension Voip_Phone_Extension,e.emp_code Emp_Code,e.emp_id Emp_ID,e.network_id Network_ID,s.site_alias Site_Alias From Employee E, Site S, Voice_Configuration V, Employee_Detail D Where V.Emp_Id = E.Emp_Id And V.Emp_Id = D.Emp_Id And D.Location_ID = S.Site_ID And V.Status = 'A' And V.Do_Voice_Recording = 'Y' And V.Voip_phone_extension != '-1' and v.emp_id not in (select e.emp_id from employee e where e.emp_first_name like 'extn_agent_%') order by voip_phone_extension I have this text content in one file and wants to read this by application; please help me out.. Thanks John;

          M Offline
          M Offline
          Maximilien
          wrote on last edited by
          #4

          So what is the issue ? You open the file, read the file line by line with CStdIO::ReadString and do what ever you want with each string : something like :

          CStdioFile myFile(\_T("C:\\\\path\\\\to\\\\your\\\\file.txt"), CFile::modeRead |CFile::typeText  );
          
          CString myString;
          while (myFile.ReadString( myString ) )
          {
          	// do something with my string.
          	std::wcout << myString.GetBuffer() << std::endl;
          
          }
          

          Watched code never compiles.

          1 Reply Last reply
          0
          • M Maximilien

            What make you think there are other condition than what is describe in the documentation ? Do you have a test case that will trigger a FALSE ? It returns FALSE (or NULL depending on which version you call) if no data is read before the end-of-file.

            John502 wrote:

            In a File Consists the Lines In one Condition "m_pString" doesn't take the line in the File?

            What does that mean : :confused:

            Watched code never compiles.

            M Offline
            M Offline
            Michael Schubert
            wrote on last edited by
            #5

            Pretty much the same reply he got from me a few days ago. :doh: http://www.codeproject.com/Messages/3701943/Visual-Cplusplus.aspx[^]

            Go and never darken my towels again - Groucho Marx

            M 1 Reply Last reply
            0
            • M Michael Schubert

              Pretty much the same reply he got from me a few days ago. :doh: http://www.codeproject.com/Messages/3701943/Visual-Cplusplus.aspx[^]

              Go and never darken my towels again - Groucho Marx

              M Offline
              M Offline
              Maximilien
              wrote on last edited by
              #6

              :cool:

              Watched code never compiles.

              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