--- Abdul Mannan <[EMAIL PROTECTED]> wrote:
> hay Guys i'm doing Adaptive Huffman Encoding adn
> Decoding Scheme
> but the Problem in it is that i have to convert the
> all the unique
> characters to strings, so that i can concatinate
> them into a new string
> and build a new node for the lower two char/strings.
>
>
> but the Compiler gives Error on the Statement like
> strcat("He",'o');
> Also on the statements like
> strcat('a','b');
>
> Even i have used the C++ string data type still it
> is causing the
> problem in Type casting...
> Can anybody tell me .. How to Tackle this type of
> Problem...
>
>
> I will be Tankfull to U..
>
I have been out of the loop for a while, so I do not
know if anyone answered or not.
The first argument of strcat must be a char array or
char pointer variable, it cannot be a literal string
or a literal character.
The second argument may be a char array or char
pointer variable or constant, or it may be a literal
string. It cannot be a literal character.
If you are using C++ std::string then you can use the
+= operator to concatenate on std::string to another
or any of the following formats:
std::string += std::string
std::string += char array, char pointer or literal
string
std::string += char is not permitted.
The std::string does not work with strcat.
Ray
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play
Sims Stories at Yahoo! Games.
http://sims.yahoo.com/