Having trouble closing an output file stream?

Here's the code I have written:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
else{
                 intronCount++;
                 intronNumberString = int2string(intronCount);
                 intronFilename = "intron"+intronNumberString+".txt";
                 ofstream fileCreate;
                 fileCreate.open(intronFilename.c_str()); 
                 while (notATG!=true){
                 fileCreate << dnaData[x];
                  x++;
                  fileCreate << dnaData[x];
                  x++;
                  fileCreate << dnaData[x];
                  x++;
                  notATG=ATGCheck(x);}
                  fileCreate.close();
                  }
                  }


The ATGCheck function checks to see if the array has a certain set of characters, and is supposed to break the loop. It does. It all does what it's supposed to. However, after that loop breaks, the output stream is not closing. What am I missing? I'm sure it's something painfully obvious.


Nevermind, I discovered the issue. It was closing the stream. The issue was something else entirely.
Last edited on
Topic archived. No new replies allowed.