how do i skip a char in filestream?
i tried the ignore function but that doesnt work in filestream, i also tried using an array[i] and said if(arr[i]=="-")
then i++ while outputting but that doesnt work either
newnew1234 15 Newbie Poster
Recommended Answers
Jump to PostLet's see the code you tried.
Jump to PostTo me this code is working too hard. Here's my take on it.
/****************************************************************************** Online C++ Compiler. https://www.onlinegdb.com/online_c++_compiler Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include <iostream> #include <fstream> using …
All 6 Replies
rproffitt 2,701 https://5calls.org Moderator
newnew1234 commented: #include <iostream> #include <fstream> #include <string> using namespace std; void read (ifstream & in, ofstream & out) { int a[20]; string temp; +0
newnew1234 15 Newbie Poster
newnew1234 15 Newbie Poster
rproffitt commented: Did you notice the code doesn't out.close()? +15
rproffitt 2,701 https://5calls.org Moderator
newnew1234 15 Newbie Poster
rproffitt 2,701 https://5calls.org Moderator
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.