Anonymous
i don't use it with std::cout at all
When do you need to flush the stream ?
Mihail
When do you need to flush the stream ?
well when you want the characters that you "printed" to actually print
Mihail
but std::cout is line-buffered, so it does that with '\n'
Dima
Azrul
What is (- >) that means??
Anonymous
I want know about c language. Full course
Learn c by writing something more closer to machine understanding like drivers, or some os kind of stuff
Liam
What is (- >) that means??
member operator. It has two operands. The left operand is a pointer, who points to a struct or class object. The right operand is the name of a member of that object. The result of the operator is the reference of the member of the object pointed by the pointer.
Liam
but std::cout is line-buffered, so it does that with '\n'
Are you sure? Do you have any reference to that?
Azrul
New =(data*) malloc(sizeof(data));
Vikas
There is nothing like this in cpp. Either you should allocate memory using new operator or malloc Using new operator: <struct_type> data = new <struct_type>(); Using malloc : <struct_type> data = NULL; data = (data*) malloc(sizeof(data));
Morgan
Liam
New =(data*) malloc(sizeof(data));
malloc sizeof(data) bytes of memory, and returns the pointer to the memory snippet, if success. Then, convert the type of the pointer from void* to`data*, and store it in `New.
Anonymous
Hello everyone
Raju
🙂
P k
P k
Can anyone say hw we got output
Anonymous
Sure.
S.
Can anyone say hw we got output
know anything about a recursive function?
S.
Then i guess you just need to trace it step by step using a pencil and paper
P k
Then i guess you just need to trace it step by step using a pencil and paper
In d second step x bcming negative then y answer is 7
S.
Like … fun(4, 5), x>1, fun(2, 7), x>1, fun(0, 9), now x is not >1, print y, the first output 9; look back to the upper level, in fun(2,7), now if block is finished, print y, the second output 7 …
Kaku
Sir i want to run graphics program in codeblocks
Kaku
Then how can i do ?
Anonymous
Morning every body am a beginer in programming and i need help to write a program
P k
975 is correct, what’s the problem
How bro . Wait I'll post my procedure
Frederick
/cbook
Frederick
/cbook
Dima
ayy lol
Meenal
🙏🙏
Dima
How
#googleit
Dotevo
Hello :-) I'm looking for a nice solution for static vector of vectors added in constructor. constructor(int X) { STATIC_VECTOR[X].push_back(this); } but
Dotevo
vector < vector<Objs*> > STATIC_VECTOR;
Dotevo
vector containsts const elements. Should I change it into vector < vector <Obj*> * > ?
Francisco
vector containsts const elements. Should I change it into vector < vector <Obj*> * > ?
Every vector<Obj*> is const? Then it should be vector<const vector<Obj*>>
Dotevo
I do not want to make it const but vector contains only const values.
Dotevo
and i cannot call push_back() there
S.
You mean Objs* is const?
Dotevo
1. vector < vector<Objs*> > STATIC_VECTOR; 2. vector<Objs*> n = STATIC_VECTOR[i]; 3. n.push_back(this); NUmber 2 will not compile because there is a casting from const.
Dotevo
It is possible to avoid it with: 1. vector < vector<Objs*> *> STATIC_VECTOR; 2. vector<Objs*> *n = STATIC_VECTOR[i]; 3. n->push_back(this);
Dotevo
but maybe there is a nicer solution then use pointers.
Anonymous
Koi big c program send karo
Anonymous
Any corner case code chef and beautiful digit
Anonymous
?
Silvestr
sorry foe dumb question, but how delete shared pointer?
Silvestr
I mean I passed it to function and want clean it inside function
Ariana
shared pointer?
Silvestr
shared pointer?
Yeah, I have two threads that access to some resource(no data races), but problem is in next -> when one thread use resource I want delete this resource and in second thread just check if it is not a nullptr
S
student(int r):roll(r) {}
S
what does it mean?
Silvestr
What is best practice for doing such things?
Silvestr
Silvestr
you call costructor of roll object
Anonymous
Welcome ajat
Anonymous
Thankyou c
klimi
welcome
Anonymous
Dima
./ban communist propaganda
Dima
Anonymous
Lol
Roxifλsz 🇱🇹
>"book to mastery" >a book about something that didn't work in real life
Roxifλsz 🇱🇹
S.
Living in a communist country but never read it ... will definitely have a read, thx for the recommendation 🌝
BinaryByter
real communist countries don't exist
S.
Only with the name left
BinaryByter
communism has never existed as proposed by marx
Thespartann