Dev C++ is a free open source software. Dev C++ is mainly compatible with the Windows platform and provides basic functions such as project management, multi-file editing and custom compilation options. Although its functions are relatively simple compared to modern IDEs (such as Visual Studio), its fast compilation and easy configuration make it popular in the education field. In recent years, the community has launched updated versions such as Dev C++ 6.0, which have optimized stability and compatibility, and fixed some loopholes in the old version. Next, let the editor of Huajun explain to you how to set up dev c++ to read the entire line of characters and the method of dev c++ to read the entire line of characters!
first step
The getline() function has three common forms:
getline(input stream, string variable)
getline(input stream, string variable, delimiter)
Step 2
#include<iostream>
using namespace std;
int main(){
string n;
getline(cin,n,''); // Read input until number is encountered
}
Step 3
If the third parameter (delimiter) is not specified, it will read until the newline character by default.
Step 4
For character arrays, you can use the cin.getline() method
Step 5
After reading it is better to check if the input was successful
The above is how the editor of Huajun compiled for you how to set up dev c++ to read the entire line of characters and the method of dev c++ to read the entire line of characters. I hope it can help you!