Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using STL

1 view
Skip to first unread message

riweber

unread,
Oct 16, 2007, 6:34:04 AM10/16/07
to
I tried to use the STL the first time in BCB2007, but I always get a
linker error: "Fatal: cannot open file". Do I have to declare something,
like a definition or so?

the code:

//---------------------------------------------------------------------------

#include <string>
#include <iostream>
#include <stdio.h>
//---------------------------------------------------------------------------

#pragma argsused
int main(int argc, char* argv[])
{
char cInput[1024];

cInput[0] = '\0';
bool bShowHelp = false;
if(argc==0)
bShowHelp = true;

for(int Index=1; Index<argc; Index++) {
if(!stricmp(argv[Index],"-?"))
bShowHelp = true;
else if(*argv[Index]!='-')
strcpy(cInput,argv[Index]);
else {
std::cout<<"Falscher Parameter!"<<std::endl;
bShowHelp = true;
break;
}
}

if(cInput[0]=='\0') {
bShowHelp = true;
std::cout<<"Kein Input-String angegeben!"<<std::endl;
}
if(bShowHelp) {
std::cout<<"Syntax: Md5Hash [-?] <Input-String>"<<std::endl;
return 1;
}

/*
hashwrapper *myWrapper = new md5wrapper();
std::string hash1 = myWrapper->getHashFromString(cInput);
delete myWrapper;
std::cout<<hash1<<std::endl;
*/
return 0;
}
//---------------------------------------------------------------------------

0 new messages