ok what does this mean............Code:int num; string str1, str2; num = str1.str2("*") +1;
and why they use it?... and how can I use it?
ok what does this mean............Code:int num; string str1, str2; num = str1.str2("*") +1;
and why they use it?... and how can I use it?
C++
The best
dont functions usually have () after their name and
{
some of these
}
No I DIDN'T steal my name from Misro$ofts OS, it's pure coincidence.
The lines around my name (-) are only there because i needed a name over the 3 character minimum letter limit
Hell if I know. It won't even compile on my system. How do you know that its a function? Wherever you got that information should tell you how its used. You ask how they use it...who's "they"? For that matter, which function are you talking about? I don't see any; you're trying to call str2 like its a member function of str1, when you actually declared it as a string variable in its own right. Where did you get your code fragment and did you test it to see that it actually did anything?
These are good questions to have answered already when you post a vague question.
Claus Hetzer
Compiler: Borland 5.5 (on Windows)
Solaris CC (on Unix)
Known Languages: C++, MATLAB, Perl, Java
Assuming this is C++, and you (or sombody) forgot the brackets, and that it works... The function and class have to be defined somewhere else in to code. Maybe in another "included" file.
I don't recognize this as anything from the standard library, but I'm not absolutely sure.
It does seem unusual to have a variable and an object both named str1, and a variable and a function both named str2. Is this legal overloading... I dunno? I think there's something wrong with passing "*" to a function too! (?)
... Doesn't look like C++ to me!
I was reading the code for a file, and it has these lines
as str1 and str2 strings
and num is an integer number
my question was :
" HAVE YOU HEAR ABOUT ANYTHING LIKE1"
num = str1.str2("*");
the problem that the cpp file does compiled.
and I don't understand what does this means , and even I didn't know why the programmer ( they) use it , and for what.
NOTE: it is not over loaded function of "."
and thanx for the replays.
C++
The best
i still dont think thats a function
No I DIDN'T steal my name from Misro$ofts OS, it's pure coincidence.
The lines around my name (-) are only there because i needed a name over the 3 character minimum letter limit