Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <sstream>
  4.  
  5. using namespace std;
  6.  
  7. int main(){
  8.  
  9. struct item{
  10. string item;
  11. string type;
  12. int price;
  13. };
  14.  
  15.  
  16. ifstream data("messageBoard.txt");
  17. data.open("messageBoard.txt");
  18.  
  19. if (data.is_open()){
  20. cout<<"success"<<endl;
  21. }
  22.  
  23. cout<<data<<endl; //shouldn't think just print the entire file? It
  24. //is only printing 0, and I am also getting "success" printed as well
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement