{"action":"opened","issue":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/484","labels_url":"https://api.github.com/repos/chrsmith/bwapi/issues/484/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/bwapi/issues/484/comments","events_url":"https://api.github.com/repos/chrsmith/bwapi/issues/484/events","html_url":"https://github.com/chrsmith/bwapi/issues/484","id":58521846,"number":484,"title":"Trying read a file","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/auto-migrated","name":"auto-migrated","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-22T21:50:10Z","updated_at":"2015-02-22T21:50:10Z","closed_at":null,"body":"```\nI'm trying read a file using this function, but crash =/\n\n#include \"QLearning.h\"\n#include <BWAPI.h>\n#include <fstream>\n\nchar* QLearning::startByFile() {\n\n\n\tchar* line;\n\tstatic std::ifstream myfile(\"bwapi-data\\\\logs\\\\QTable.txt\");\n  if (myfile.is_open())\n  {\n    while ( myfile.good() )\n    {\n\t\tmyfile.getline(line, 256);\n    }\n    myfile.close();\n  }\n\n\t  return line;\n}\n\n\n================\n\nThe call is:\n\n\t  qLearning = new QLearning();\n\t  Broodwar->printf(qLearning->startByFile());\n\n\nAnyboy can help me?\n```\n\n-----\nOriginal issue reported on code.google.com by `regis.cl...@gmail.com` on 28 Feb 2013 at 4:30"}}