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. Frustrating..

Frustrating..

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
5 Posts 2 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.
  • H Offline
    H Offline
    H P
    wrote on last edited by
    #1

    std::getline(cin, somestring, '\n' ) seems to work as cin>>somestring with my Visual C++ 6.0. It sees whitespace as delimiter so i cant get multiword sentence from cin ... Whats wrong?

    J 1 Reply Last reply
    0
    • H H P

      std::getline(cin, somestring, '\n' ) seems to work as cin>>somestring with my Visual C++ 6.0. It sees whitespace as delimiter so i cant get multiword sentence from cin ... Whats wrong?

      J Offline
      J Offline
      Joaquin M Lopez Munoz
      wrote on last edited by
      #2

      std::getline(cin,somestring,'\n') shouldn't stop on whitespace. My guess is that you are misinterpreting the behavior of your program. Could you please post a snippet of code where this anomaly shows? Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

      H 1 Reply Last reply
      0
      • J Joaquin M Lopez Munoz

        std::getline(cin,somestring,'\n') shouldn't stop on whitespace. My guess is that you are misinterpreting the behavior of your program. Could you please post a snippet of code where this anomaly shows? Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

        H Offline
        H Offline
        H P
        wrote on last edited by
        #3

        in this member function... void PolishNotation::GetExpression() { cout<<"Insert Expression: "<

        H 1 Reply Last reply
        0
        • H H P

          in this member function... void PolishNotation::GetExpression() { cout<<"Insert Expression: "<

          H Offline
          H Offline
          H P
          wrote on last edited by
          #4

          comments for my previous post: m_strExpression is std::string of course... An idea came across my mind: Maybe its somehow involved with this Bug fix? But it seems highly unlikely... Hannes

          J 1 Reply Last reply
          0
          • H H P

            comments for my previous post: m_strExpression is std::string of course... An idea came across my mind: Maybe its somehow involved with this Bug fix? But it seems highly unlikely... Hannes

            J Offline
            J Offline
            Joaquin M Lopez Munoz
            wrote on last edited by
            #5

            I don't think it has to do with that bug --the manifestations are different. I don't know. It beats me. It's so simple I cannot figure out what more to test. Are you 100% sure m_strExpression doesn't contain whitespace although you've typed it in? How are you checking the actual value of this variable? Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

            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