Home » Community » Newbie corner » errors re strings
Re: errors re strings - SOLVED [message #46367 is a reply to message #46365] |
Fri, 29 April 2016 13:24   |
nlneilson
Messages: 644 Registered: January 2010 Location: U.S. California. Mojave &...
|
Contributor |
|
|
Hi mr ped thanks I did not know there was such a difference and that mixing them could lead to errors,
Most of my apps depend on several header .h 'apps' so I will try and remember what could cause problems.
I have no preference for which string or String, whatever works but I will try to use just one.
mr_ped wrote on Fri, 29 April 2016 01:44std::string and Upp::String are two completely different classes.
So the question is, why do you even use std::string in U++ application (or the other way around, why don't you stick solely to std::string, if you want to keep usage of U++ low and having that part of source usable without U++ Core too).
If your app is strongly U++ dependent, I would go for Upp::String only (except places where you call some external library, which has input as std::string, at that single point I would convert the String to string, but otherwise I would keep internally everything in String).
I often write clean C++ libraries in TheIDE (to be compiled on phone platforms, so I don't use Upp at all), then I use std::string only.
Your mixed way is certainly possible too, but I think it's not giving you any advantage, just confusing.
Neil
[Updated on: Thu, 05 May 2016 09:30] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Wed Apr 30 16:08:24 CEST 2025
Total time taken to generate the page: 0.00702 seconds
|