Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <fstream>
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6. using namespace std;
  7. int main()
  8. {
  9. ifstream file("d:\t.txt");
  10. if (file.is_open())
  11. {
  12. string a[5];
  13. for (int i = 0; i < 5; ++i)
  14. {
  15. file >> a[i];
  16. }
  17. }
  18. cout<< a;
  19. system("pause");
  20. }
  21.  
  22. 1>------ Rebuild All started: Project: Project3, Configuration: Debug Win32 ------
  23. 1> Source.cpp
  24. 1>c:usersmalatrabdocumentsvisual studio 2013projectsproject3source.cpp(14): error C2065: 'a' : undeclared identifier
  25. ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement