- 5

Use getline to input three students names

C++ array

22nd Nov 2020, 10:38 AM
Anas kayani
Anas kayani - avatar
15 Antworten
+ 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 .
22nd Nov 2020, 11:24 AM
Mr. Knight
+ 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 .
22nd Nov 2020, 11:09 AM
Mr. Knight
+ 2
As your question isn't really clear, no one can answer it. So, firstly, make your question clear.
22nd Nov 2020, 11:16 AM
Misbah Ahmed
Misbah Ahmed - avatar
+ 2
Sorry my way of questioning was not right
22nd Nov 2020, 11:34 AM
Anas kayani
Anas kayani - avatar
+ 1
Anas kayani you can use both. String is better in C++
22nd Nov 2020, 11:38 AM
Misbah Ahmed
Misbah Ahmed - avatar
+ 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
22nd Nov 2020, 1:36 PM
coder
22nd Nov 2020, 11:35 AM
Anas kayani
Anas kayani - avatar
0
I want to write names of three students
22nd Nov 2020, 11:36 AM
Anas kayani
Anas kayani - avatar
0
Can i do it using char arr[] or i have to use string
22nd Nov 2020, 11:37 AM
Anas kayani
Anas kayani - avatar
22nd Nov 2020, 11:46 AM
Anas kayani
Anas kayani - avatar
0
What is the issue with this code?
22nd Nov 2020, 11:47 AM
Anas kayani
Anas kayani - avatar
0
Dear friend . Please use post section to describe your code and your question to prevent too much useless comments . Thank you .
22nd Nov 2020, 12:08 PM
Mr. Knight
0
#include <iostream> using namespace std; int main() { char a[60]; cin.getline(a,256); cout<<a<<endl; return 0; } This code works fine
22nd Nov 2020, 1:26 PM
coder
- 4
Urgent
22nd Nov 2020, 10:38 AM
Anas kayani
Anas kayani - avatar
- 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.
22nd Nov 2020, 11:18 AM
rodwynnejones
rodwynnejones - avatar