Errors

Hi,

This is my C++ code I’m trying to run:

[code]#include “TFile.h”
#include “TTree.h”
#include “TCanvas.h”
#include “TString.h”
#include

using namespace std;

TH1F *histogram = new TH1F( “histogram”, “Title”, 9, 1,9);

ifstream instream( “…/…/results/nuclear levels/my_data.dat”);
Int_t i = 0;
while(instream>>i){
histogram->Fill(i);
}
histogram->Draw();[/code]

When I try to compile this code, I get the following error:

Info in <TWinNTSystem:: ACLiC>: creating shared library (...)\histogram_C.dll 'cl.exe' is not recognized as an internal or external command, operable program or batch file. Error: external preprocessing failed. (0) !!! Removing (...)\histogram_C_ACLiC_ditc.h !!! Error: D:\root\bin\rootcint: error loading headers... Error in <ACLiC>: Dictionary generation failed! Info in <ACLiC>: invoking compiler to check macro's validity 'cl' is not recognized as an internal or external command, operable program or batch file.

What is wrong? I’m trying to run ROOT on windows 7, but I’m not sure if this error has anything to do with that…

Thanks!

#include "TH1.h" #include <fstream> void histogram(void) { TH1F *histogram = new TH1F("histogram", "Title", 9, 1, 9); std::ifstream instream("../../results/nuclear levels/my_data.dat"); Int_t i; while(1) { instream >> i; if (!(instream.good())) break; histogram->Fill(i); } instream.close(); histogram->Draw(); }
BTW. what concerns “cl.exe”, I believe you need to install MS VC++ -> seach for “Windows” in http://root.cern.ch/drupal/content/production-version-532