python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Get class member from next member's address
I'm wrapping a C interface and require to pass into it the address of a preallocated buffer. My wrapper places this buffer at a known location within wrapper object A. At runtime, I will be able to qu...
glades
Votes: 0
Answers: 0
Initialize member string with class object name in C++?
Is there a way to instantiate an object and have a string member take the object's name? I would also not mind for a gcc builtin.
Here's an example:
#include <string>
class A
{
std::str...
glades
Votes: 0
Answers: 0
Unable to use string as class atribute (see the Update 4)
Take this class as example:
#include <string>
using namespace std;
class One {
private:
string * text;
public:
One();
~One();
void setText(string value);
string uppercase();
strin...
Kleber Mota
Votes: 0
Answers: 1
Placing member functions inside definition
I'm in the process of moving a lot of oft-used functions into classes, and hit a snag that I can't explain.
With the "STD::random-device rd" and "std::mt19937 gen(rd())" declaratio...
Fairlight
Votes: 0
Answers: 1