title: ofstream will not write to a text file
body: <p>I am using Dev C++ to write to a text file using ofstream but it does not work, I have made a text file in dev c++and saved it and on another source file I wrote the following code:</p>
  
  <pre><code>  #include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;cstdlib&gt;
  using namespace std;
  
  int main(){
  
  srand(time(0));
  ofstream out(“hello.txt”);
  
  for(int i=0;i&lt;100;i++)
            out &lt;&lt; rand()%1000 &lt;&lt; “ “;
  out.close();
  
  
  return 0;
  }
  </code></pre>
  
  <p>However, when I try to compile this code I get an error and it highlights the following in red:</p>
  
  <pre><code>ofstream out(“hello.txt”);
  </code></pre>
  
  <p>It says hello undeclared.</p>
  
  <p>The tutorials that I am following are from youtube and the programmer is using a Linux operating system, he is using g++, will the code still be the same on all operating systems? because I am using windows 7.</p>