- 5
Use getline to input three students names
C++ array
18 Réponses
+ 5
rodwynnejones , discussion section in this thread is for asking programming/coding related questions .
You might heard "search bars" alot because you asked wrong questions .
Have a bright day .
+ 3
Greetings .
Please try the following steps :
# try to google your problems or errors
# ask a professional person in your case
# use better sentences to ask your questions .
Thank you .
Happy quarantine .
+ 2
As your question isn't really clear, no one can answer it. So, firstly, make your question clear.
+ 2
Sorry my way of questioning was not right
+ 1
Anas kayani you can use both. String is better in C++
+ 1
https://code.sololearn.com/c9HNt60v9IjL
This code is working fine syntactically. To enter multiple inputs use line breaks like this when providing input for cin statements:
Name 1
Name 2
Name 3
10
9
10
0
I want to write names of three students
0
Can i do it using char arr[] or i have to use string
0
What is the issue with this code?
0
Dear friend .
Please use post section to describe your code and your question to prevent too much useless comments .
Thank you .
0
#include <iostream>
using namespace std;
int main() {
char a[60];
cin.getline(a,256);
cout<<a<<endl;
return 0;
}
This code works fine
- 4
Urgent
- 4
Dear Sololearn.
Could you please remove the Q and A (discuss) section from Sololearn...there is no need for it...just have a page where it says "search on Google".
edit...I was being sarcastic!!...It was in response to post (now deleted) directing the poster to search on google.