M
Markus Pitha
Hello,
first of all I have a question about types:
When I have a method like this...
TYPE getStringValue() {
string str = "test";
return str;
}
....TYPE can't be "string" because "string" is no basic type.
I made some workaround with creatng a class Stringtype and using this
class as return type while Stringtyp contains the real string;
How is this to solve in the right way?
My second question is about string itself:
In a string I want to add the new line mark of the current operating
system to a string.
string str += "\n"; would work, but how is this to solve with std::endl?
Thanks,
Markus
first of all I have a question about types:
When I have a method like this...
TYPE getStringValue() {
string str = "test";
return str;
}
....TYPE can't be "string" because "string" is no basic type.
I made some workaround with creatng a class Stringtype and using this
class as return type while Stringtyp contains the real string;
How is this to solve in the right way?
My second question is about string itself:
In a string I want to add the new line mark of the current operating
system to a string.
string str += "\n"; would work, but how is this to solve with std::endl?
Thanks,
Markus