i have a testing program with the following code:
Code:
#include "stdafx.h"
#include <iostream.h>
int _tmain(int argc, _TCHAR* argv[])
{
int choice,ended = 0;
while(ended!=2)
{
cout <<"enter your choice";
cin >> choice;
if (choice==1)
{
cout << "hello\n";
}
else
{
cout << "bye\n";
ended = 2;
}
}
return 0;
}
this program works well but when i tried to do the same in a different program, it wont work. once i input 1, the program ended.
i have include several header files in the second porgram and they are:
Code:
#include "stdafx.h"
#include <fstream.h>
#include <iostream.h>
#include <string.h>
#include <stdlib.h>
the second program perform some file read write tasks and running some *.bat file
i wonder the header file will affect the result of the program.please help.
i am using studio.net.....