Deleted Account
I use him to manage the reference counter.
Deleted Account
Deleted Account
SocketServer is an intrusive ptr? Really?
socket server based intrusive ptr
Anonymous
1) Why there's even void in functions params
Deleted Account
(void) same ()
Anonymous
socket server based intrusive ptr
2) inheritance mean "is a" So with your code it's saying "socket server is an intrusive pointer" which is not true
Anonymous
(void) same ()
(void) is stupid
V01D
Deleted Account
So what should I do? class NetSocketServer : public CIntrusivePtr
Deleted Account
I use libuv, He posted a lot of asynchronous requests.
Anonymous
You should store a pointer as a member
Anonymous
Not deriving from it
Deleted Account
store a pointer as a member?
Deleted Account
Deleted Account
If I'm storing as a member, I need very complex counter management.
Deleted Account
and close
Deleted Account
Deleted Account
I learned SOLID.
Anonymous
Best book for learning C from beginning at home DIY
Anonymous
If I'm storing as a member, I need very complex counter management.
Make it another class that will do this management
Deleted Account
Make it another class that will do this management
I can't do it. My reference counter is primarily a record of uv_handle_t initialization of information. If uv_write is not completed then refcnt will add 1, completion will be reduced, if all handle is turned off then it is automatically released.
Deleted Account
Do you mean ComPtr(Windows COM Interface)
Sai
#include<stdio.h> int main() { float x = 0.1; if (x == 0.1) printf("IF"); else if (x == 0.1f) printf("ELSE IF"); else printf("ELSE"); } why the output of this is ELSE IF?
Hermann
float?
Anonymous
Hi by any chance i know this sounds like a dumb question, but how could i replace user input, as he types on windows? Like if the user types a "K" somewhere i would like an "a" to appear instead. And have each character basically mapped to another character. Ive been thinking of a dumb way of doing it and just using GetAsyncKeyState(...) to check for each chatacter i want to have mapped and then simply send 2 keystokes: backspace to delete the original one and then the character i mapped it to
Anonymous
#include<stdio.h> int main() { float x = 0.1; if (x == 0.1) printf("IF"); else if (x == 0.1f) printf("ELSE IF"); else printf("ELSE"); } why the output of this is ELSE IF?
This is a percision problem. 0.1 is a double literal and you campare it to a float. If you write down 0.1 as a binary number, youll see it is a periodic number hence the percission matters
Anonymous
Comparing floating points with == is always something tricky.... its in most cases a better idea to check if the number is in a specific range instead. Make sure you understand the IEEE standard for representing floating point values and how impercise they can get when using big numbers.
Andrew
every character you type in input is memorized in a buffer
Renan
I tried this but can't do it pls help.reply if you guys know it.
OK. We have 8 lines, the first two must be aligned at zero position, the next 2 zero+1, the next 2 zero+2, the next one zero+1, and the last one at zero. That is how I see it.
Anonymous
it should work cross application. Like im unlikely going to use dll injection or somwthing to get access to a buffer in another application
Anonymous
OK. We have 8 lines, the first two must be aligned at zero position, the next 2 zero+1, the next 2 zero+2, the next one zero+1, and the last one at zero. That is how I see it.
Im unsure how to read files line by line again. But you can can do that and have the line as a result in char[], you can then loop over each character for a certain length and compare them to ' ' or '\t'. Meaing if the first line should be indented by 0 you check the first character only and it must me unequal to whitespace. If the 2nd line must be indented by 1 tab, the first character must be tab and the dollowing unequal to whitespace, or the first 4 character must be equal to ' ' and the following unequal to whitespace.
Anonymous
? It uses the winapi
Andrew
yes
Anonymous
so not going to work on linux
Anonymous
Sry didnt understand the question or suggestion?
Renan
so not going to work on linux
If you insert an ifdef Linux then add code for Linux yes. 😅
Andrew
so not going to work on linux
you have to write 2 diffrent functions, then select with IFDEF based on the OS
Anonymous
Its not supposed to work on linux, thats not the problem
Andrew
then is okay
Andrew
https://pastebin.com/x4GAb6DCthis found on net , you can change it
Thor
Can I paste code here?
Renan
Can I paste code here?
Only if short, very short. Otherwise use pastebin.
Renan
Renan
Please, use pastebin. 😅
Thor
Ok
Thor
Ppiywt2L.txt
Angad
ANGAD KUMAR
Thor
Ppiywt2L.txt
Look at this.I don't understand why space count is giving output 0. I think scanf is unable to read and store leading spaces.
Aaron Nevalinz
Look at this.I don't understand why space count is giving output 0. I think scanf is unable to read and store leading spaces.
No sure about your placeholder in the first scanf function. Doesn't click, what's that?
Andrew
Andrew
correct should be
Andrew
for(j=0;ch[j]!=0;j++) //this is space count logic upto first { if(ch[j]==32) // space scount++; }
Andrew
Sachin
Anonymous
Hi guys I have a question and that's related to quotient , when I gave it 10 , 20 instead of giving 0.5 it gave me 0 How can I solve this problem ?
Anonymous
I know the question is simple Please help me🙏🙏
Andrew
you should use double
Anonymous
you should use double
We don't need to use instead of %d , %f?
Andrew
yes, but also data type should match
Andrew
you probably used an %f with int variables
Anonymous
Andrew
yes, you used int, you must change wether to double
Andrew
or make cast division = (double)a/(double)b