how can i make this program enter this file (arguments) and its content from screen (not as command line arguments)

actually, the below program is a console program, and needs command line arguments, that are as files i'm entering from (project properties-Visual studio c++ 2008). how can i make this program enter this file (arguments) and its content from screen by user(not as command line arguments)??

#include "include.h"

void __cdecl _tmain(int argc, TCHAR *argv[])
DWORD ini=GetTickCount();
if( argc == 3 ) //recombine
RabinIDA rabin=RabinIDA(17,10);
long long size=GetFileSize(argv[1]);
int f[]={0,2,3,5,6,8,9,11,14,15};
else if(argc == 2)
RabinIDA rabin=RabinIDA(17,10);
printf("Error. To split a file pass a parameter with the file to be splitted\n");
printf("To recombine the file give the name of the original file and the output file\n");
printf("The name of the file is used to get the size of the original file only, in a production\n");
printf("environment the length of the original file and the id of the share must be stored along with the share");
catch (int)
PrintLastError(_T("MAIN CATCH"));

this is a link of whole program ( Information Dispersal Algorithms Rabin-IDA.

Despite your horrible indentation (use
please to format your code) and those mysterious Microsoft stuff like DWORD, ...

... you may either use scanf(3) from <stdio.h> for C-programs or better operator>>() on `cinĀ“ for a C++ program.

see for scanf(3)
and for operator>>()
Topic archived. No new replies allowed.