Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <string>
- #include <iostream>
- #include <fstream>
- class Charac
- {
- public:
- Charac(const std::string& fileName);
- private:
- bool _cara[20][20];
- char _corresNumber;
- char _foundNumber;
- };
- Charac::Charac(const std::string& fiN)
- {
- std::ifstream st;
- std::cout << "fname: " << fiN << std::endl;
- st.open(fiN.c_str());
- std::cout << "file: " << st.is_open() << "fname: " << fiN << std::endl;
- for (int i = 0; i < 20; i++) {
- std::string read;
- st.width(20);
- st >> read;
- for (int j = 0; j < 20 && j < read.size(); j++) {
- this->_cara[i][j] = (read[j] == '0');
- }
- }
- st.close();
- }
- int main() {
- Charac testChar0(std::string("C:/Users/Exanis/Documents/Visual Studio 2008/Projects/gaea/Release/txt/0.txt"));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement