cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Execute program from Command Prompt
Execute program from Command Prompt
Nov 16, 2010 at 4:56am UTC
Pratima
(1)
I have written the following program. Can anyone please tell me how to execute this program? C:\Users\myname\Documents\Visual Studio 2005\Projects\PPA\debug\ppa.exe.
#include <iostream>
#include <fstream>
using namespace std;
int main(int argc, char **argv){
char *buffer = new char[255];
ifstream *inputfile = new ifstream( );
inputfile->open( argv[1] );
while(inputfile->getline(buffer, 255, '\n') != NULL)
{
cout << buffer << endl;
}
}
Nov 16, 2010 at 5:39am UTC
Athar
(4466)
cd "C:\Users\myname\Documents\Visual Studio 2005\Projects\" ppa.exe
Topic archived. No new replies allowed.