dimanche 28 avril 2019

gcc-make-run: Grammar Not Supported

I have been trying to learn C++11 and when I try to compile my code in Atom, it gives me the error "gcc-make-run: Grammar Not Supported, only C, C++ and Makefile are supported". I have no idea what it means and found nothing about it on Google.

I have the gcc-make-run 0.2.12 package and my compiler flag is:

-pedantic-errors -std=c++11

Here's my code:

#include <iostream>
#include <fstream>
#include <cstdlib>
#include <string>
using namespace std;

int main()
{
  string filename, line;
  cin >> filename;

  ifstream fin;
  fin.open("bitch.txt");
  if (fin.fail()){
    cout << "Error in opening bitch.txt!"
    exit(1);
  }

  while (getline(fin, line)){
    cout << line << endl;
  }
  fin.close();
  return 0;
}

Aucun commentaire:

Enregistrer un commentaire