D
David Williams
Hi,
I am having some difficulties compiling a library written by someone else,
and was hoping someone could indicate what's wrong! I have cut the code
down to what I believe to be the relevant part. If anyone can suggest how
to make the following code compile it would be greatly appriciated.
#include <iostream>
#include <iomanip>
std:stream& ket(std:stream& os, char* ket_val)
{
return os << " |" << ket_val << '>';
}
std:manip<char*> ket(char* ket_val) //Error occurs here
{
return std:manip<char*> (ket, ket_val);
}
From the compiler (g++ 3.3.1) I get:
test.cc:9: error: syntax error before `(' token
I believe the code was supposed to compile on earlier versions of the
compiler. I have made small changes such as removing '.h' from the headers
and putting 'std::' before some classes.
Thanks in advance for any help you can give,
David
I am having some difficulties compiling a library written by someone else,
and was hoping someone could indicate what's wrong! I have cut the code
down to what I believe to be the relevant part. If anyone can suggest how
to make the following code compile it would be greatly appriciated.
#include <iostream>
#include <iomanip>
std:stream& ket(std:stream& os, char* ket_val)
{
return os << " |" << ket_val << '>';
}
std:manip<char*> ket(char* ket_val) //Error occurs here
{
return std:manip<char*> (ket, ket_val);
}
From the compiler (g++ 3.3.1) I get:
test.cc:9: error: syntax error before `(' token
I believe the code was supposed to compile on earlier versions of the
compiler. I have made small changes such as removing '.h' from the headers
and putting 'std::' before some classes.
Thanks in advance for any help you can give,
David