Hal Vaughan wrote:
> Hal Vaughan wrote:
....
> There's one problem that didn't show up until I fixed this one.
>
> I have my own library with this function:
>
> void parseargs(int, char*);
>
> I call it from the main function with argc and argv. When I've compiled
> this without using make there was no problem, but now that I'm using
make
> (or compiling it by hand, with the changes make needed), I get this
error:
I die a make clean and tried again and this would be the correct error:
hdcmd.cpp: In function ?int main(int, char**)?:
hdcmd.cpp:35: error: cannot convert ?char**? to ?char*? for argument ?2?
to ?std::map<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::less<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
std::allocator<std::pair<const std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > > > > parseargs(int,
char*)?
Here's the line calling the function:
clArgs = parseargs(argc, argv);
And here's the function definition:
map<string,string> parseargs(int count, char* args[]) {
.....
}
Hal


|