After I Prompt the user to get an integer from the keyboard, display the number on screen if it is an even number how do I write the number into a file in A:\ drive under the name OddFile.txt. if its odd.

#include <iostream>                                                                                      
#include <fstream>    
#include <cstdlib>    
using namespace std;    
 int main ()    
    int num;    
     ifstream AFile;  "a:\\OddFile.txt");    
     cout << "Enter an integer number please: ";    
     cin >> num;     
     if (num % 2 == 0)    
            cout << num << " is even\n";    
       return 0;    

You have opened the file twice, I think you only need to open it once as
you did first.
So if you want to write the number to the file you could do like this:

ofstream AFile;"a:\\OddFile.txt");

AFile << num;

line 15 is still wrong -- what is it that you want to do when the value of num is odd ? I know you don't want to open the output file because you already did that at line 9. Someone else already gave you a hint of what to do in your other thread about this same program.