Dima
fake
Dima
Ariana
tempted to play Bx haha
Amos
Hi, how can I implement this without lock c++ template <typename T> class MultiVersion { public: /// Version of object for usage. shared_ptr manage lifetime of version. using Version = std::shared_ptr<const T>; /// Default initialization - by nullptr. MultiVersion() = default; MultiVersion(std::unique_ptr<const T> && value) { set(std::move(value)); } /// Obtain current version for read-only usage. Returns shared_ptr, that manages lifetime of version. Version get() const { /// NOTE: is it possible to lock-free replace of shared_ptr? std::lock_guard lock(mutex); return current_version; } /// Update an object with new version. void set(std::unique_ptr<const T> && value) { std::lock_guard lock(mutex); current_version = std::move(value); } private: Version current_version; mutable std::mutex mutex; };
Jules
hello, quick question about classes and the like
Jules
for some reason, in a method of class A, I can no longer access the members after instancing class B
Jules
the code goes like this:
Jules
CPUState CPUState::doStep() { // Various operations that do not instance classes assert(memory.unsafe->a != nullptr); Bits<8>("operand"); assert(memory.unsafe->a != nullptr);
Jules
All the asserts above Bits<8>("operand"); work correctly, but the last one throws
Sanjay
Alright can some one help me with JSON?
Sanjay
https://www.quandl.com/api/v3/datasets/NSE/RELIANCE.json?api_key=pPz-2hyBDJfYt--8uxfJ
Sanjay
to Text file any ideas ?
Sanjay
XML also ok
Sanjay
https://www.quandl.com/api/v3/datasets/NSE/RELIANCE.xml?api_key=pPz-2hyBDJfYt--8uxfJ
Anonymous
XD
Sanjay
Use Go
what ?
Anonymous
what ?
godoc.org/encoding/json#Unmarshal
Igor🇺🇦
Igor🇺🇦
There are many json parsing libraries in c++
Jussi
https://github.com/nlohmann/json
mark
Hey does anyone here know how to openline/unlock sim card from another carrier?
Jussi
I think SIM cards are still non crackable
Jussi
And this is the wrong forum nevertheless
Anonymous
👍
रोहित
👍
Anonymous
thank u
Anonymous
#cpp
Anonymous
anyone can tell me how to type cast string to int after writing in file
Igor🇺🇦
anyone can tell me how to type cast string to int after writing in file
You can't " type cast " string to int. You can use stoi function to parse string that will return int
Igor🇺🇦
strtol > atoi
I'm talking about std::stoi, not atoi
Daniele°
Ah, ok, sorry
Anonymous
Welcome Tarun! Please read the pinned message
Anonymous
Shall I post job openings here for c++. We prefer candidate from India only..
Anonymous
Only if it isn't scam
I post only real time job opportunity. I'm working as HR in Blockchain product development base organisation
Anonymous
Hmm okay
Yashwanth
If possible post jobs in Bangalore also
Jollybox.h
Hello everybody. My english is not well. Forgive me. I have a question. I created a keylogger with c++ but I want it automatic run when windows start. How can I do it with code
Anonymous
Looking for C++ Developer & Lead with 4-10+ yrs exp. Hyderabad location (India). Preferred only candidate from India. We are Product base organisation in Blockchain.. Resumes: sandeep.ganti@zebi.co
Anonymous
Looking for C++ Developer & Lead with 4-10+ yrs exp. Hyderabad location (India). Preferred only candidate from India. We are Product base organisation in Blockchain.. Resumes: sandeep.ganti@zebi.co
Anonymous
Ok
Anonymous
Hi. Thanks. :)
Anonymous
Please don't post again and again
Ok sorry. Posted as new members joined..
Sherin
Sherin
how can i add error message to that program
Anonymous
Ok sorry. Posted as new members joined..
New people will keep joining everytime lol
many
how can i add error message to that program
Simply printf, or cerr, or output to file descriptor 2 if you're using Linux
Sherin
@anunaym14 for all the case
Sherin
Eric im using devC++
Sherin
im a student , and still noob >,<
Anonymous
@anunaym14 for all the case
I don't get what you are trying to do.. Are you trying to debug?
many
Do you mean you handle errors by yourself?
Sherin
Im doing a program for a mobile phone for (contact) If i run, and put and invalid number...then have to put an error message
Sherin
Eric yes
many
Just check for the cases and printf can get the job done
Sherin
Thankyou Eric
Sanjay
You seem to be leaking an API key :)
hMM it's ok i will reset it after sometime :)
Jollybox.h
How can I do mobile app with c++
Roxifλsz 🇱🇹
/warn not even remotely related to programming
Bilol
Hello everybody!
Bilol
I need help! I wanna learn programming in c++. What shall I do?
Bilol
I need your help!
Bilol
thank you in advance
Bilol
It would be nice If you give me some guide books about c++
Jussi
Damn
Jussi
What was the bot command for book and reading recommendations
Anonymous
Okk
Bilol
Can't you remember?
Jussi
Cant
Jussi
Buy the K&R C programming book
Jussi
It is very good, learn C before C++