« first day (747 days earlier)      last day (1681 days later) » 

10:58 AM
!!/ban me
!!/ban *
 
2 messages moved from PHP
 
 
2 hours later…
12:48 PM
1
Q: Safely concatenate c-strings in class constructor

XlaudiusI have a class that needs to concatenate two const char* strings during construction, and even use the result (concatenated string) later on in the initialization list. const char* SUFFIX = "suffix"; class widget { public: widget(const char* prefix) : key(???), cls(key) { }; private: c...

 
Xeo
@Xlaudius std::string, now go and play with that
 
I need help guys, i guess this is simple
I need char*
 
DeadMG in 3, 2, 1...
 
Xeo
@Xlaudius No you don't, atleast not directly.
 
@Xlaudius that is not true
 
12:49 PM
the library I use takes a const char* in class constructors
 
Xeo
std::string::c_str()
 
so i would have to c_str all the time
 
Kill it with fire
 
Xeo
@Xlaudius Problem solved.
 
not really
i dont want to c_str every 1ms
 
12:50 PM
Yes really
 
@Xlaudius why would you want to use c_str?
 
Then don't use broken libraries
 
its boost
:D
 
@Xlaudius Do it once with auto p = whatever.c_str(); then use p.
 
Stupid chat
 
user1357851
12:51 PM
why daisy, why!!
 
What in Boost
 
@Xlaudius show real example
 
this is really real
3
 
Xeo
@Xlaudius Yeah, because that is totally gonna kill performance and everything.
 
boost::interprocess::managed_shared_memory
 
12:51 PM
Ugh if you start talking about performance I'm binning everything
 
@Xlaudius why do you exactly don't want to use c_str()?
 
I can, i'd have to use it everywhere in the code
for performance i'd rather not
 
Xeo
Okay, thread over.
 
OMG @Cat
@Xlaudius /thread
 
Xeo
13 messages moved from Lounge<Daisy>
22 messages moved from Lounge<Daisy>
 
 
6 hours later…
7:06 PM
Eehrm guys, I think I have a error in vs, can anyone verify it: pastebin.com/6AdyEVDC
p2-p1 is 5
how the ****
and it is not a threading issue
my app is single threaded
 
5 messages moved from Lounge<C++>
 
 
1 hour later…
8:35 PM
Autofellatio is the act of oral stimulation of one's own penis as a form of masturbation. It is physically possible for men who have sufficient flexibility, penis size or a combination of the two to perform autofellatio. Autofellatio is a niche in pornography. It has also been observed, simultaneously with manual masturbation, among Cape ground squirrels. History Egyptologist David Lorton says that many ancient texts refer to autofellatio within the religion of Egypt, both in the realm of the gods and among the followers performing religious rituals. According to Lorton, in the Papyrus...
 
1 message moved from Lounge<C++>
 

« first day (747 days earlier)      last day (1681 days later) »