Why is it not showing characters after space. Though I have used getline. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Why is it not showing characters after space. Though I have used getline.

#include <iostream> #include<fstream> using namespace std; int main() { char array[50]; cout<<" my array "<<endl; cin.getline(array,50); cout<<"name "<<array<<endl; ofstream out; out.open("bank.text",ios::app); out<<" name "<<array<<endl; out.close(); char arr1[500]; ifstream readfile; readfile.open("bank.text",ios::app); readfile.getline(arr1,500); readfile.close(); return 0; }

12th Jan 2021, 4:52 PM
Anas kayani
Anas kayani - avatar
0 Answers