Rabin's information dispersal algorithm

#include "include.h"

void __cdecl _tmain(int argc, TCHAR *argv[])
{
DWORD ini=GetTickCount();
try
{
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};
rabin.recombine(argv[1],
f,
argv[2],
size);
}
else if(argc == 2)
{
RabinIDA rabin=RabinIDA(17,10);
rabin.split(argv[1]);
}
else
{
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");
return;
}
printf("%d\n",GetTickCount()-ini);
}
catch (int)
{
PrintLastError(_T("MAIN CATCH"));
}
}






Actually, i used the source code of Rabin's information dispersal algorithm, which is i found in (https://sites.google.com/a/juancamilocorena.com/juan-camilo-corena/home/projects).

and i run it in visual studio c++ 2008, but not executed and returned this message (Error. To split a file pass a parameter with the file to be splitted To recombine the file give the name of the original file and the output file The name of the file is used to get the size of the original file only, in a production environment the length of the original file and the id of the share must be stored along with the share). as written in the main.cpp, that i wrote above.

plz help me, how can i run this program???






This is a console program, and needs command line arguments. You can set command line arguments in VS, but I'm not sure how. You're better off opening up "cmd" going to the folder of the program, and running it there:
C:\myFilePath> program input.txt

Or something like that.
Topic archived. No new replies allowed.