Lesson 3 of 24
cin ಮತ್ತು getline ಮೂಲಕ Input
8 min 20 XP
cin >> x space ಅಥವಾ ಹೊಸ ಸಾಲಿನವರೆಗೆ ಒಂದು value ಓದುತ್ತದೆ. Spaces ಇರುವ ಇಡೀ ಸಾಲಿಗೆ getline(cin, s) ಬಳಸಿ. cin >> ನಂತರ getline ಮೊದಲು ಉಳಿದ newline ಬಿಡಲು cin.ignore() call ಮಾಡಿ.
Example: edit me and press Run
Output Loading C++ (first time takes a few seconds)
Press Run to see the result here.