Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <sstream>
- using namespace std;
- int main(){
- struct item{
- string item;
- string type;
- int price;
- };
- ifstream data("messageBoard.txt");
- data.open("messageBoard.txt");
- if (data.is_open()){
- cout<<"success"<<endl;
- }
- cout<<data<<endl; //shouldn't think just print the entire file? It
- //is only printing 0, and I am also getting "success" printed as well
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement