Siddhant
use python
I want to learn cpp, I could have done it in JS or Kotlin 😅
sree nandhan
Thats just one bit longer....
but it can store 2 times the number that long can .
Siddhant
Okie
sree nandhan
Yeah.... Thats... One bit
¯\_(ツ)_/¯
Siddhant
Boost is for tasks like multithreading and image processing, I just want to calculate Fibonacci for large n😅
Siddhant
?
sree nandhan
how exactly should I use "\a" escape sequence to get a Alert in output ? In a printf statement
Daniele
printf("\a");
Daniele
what do you mean?
Daniele
boh windows and linux support that escape sequences
sree nandhan
I used \a in printf like you have mentioned , but I don't hear any alert
sree nandhan
I don't know what I should I be doing apart from using \a to make it work .
V01D
I used \a in printf like you have mentioned , but I don't hear any alert
You might want to put it in a loop and make sure the speakers are on: for (;;) printf("\a");
V01D
Or just go hardcore and make a driver for the PIT that only writes to channel 2
Anonymous
Yoo
Karan - 1DS20IS042
CS50 — Harvard
In this course is there every thing about C
soswift
Guys
olli
In this course is there every thing about C
No, C is too complex and it's unlikely that you need to know everything about it. You can also read the standard draft here http://www.iso-9899.info/n1570.html
olli
Which course should I join online to learn C
CS50 - Havard https://www.youtube.com/watch?v=iRkKEHybf9M&start=490
Renan
How do I avoid integer overflow
In what programming language? 🤔
Renan
Welcome, @Esther0412!
Anonymous
Thank you
Anonymous
Is there any benefit to writing code this way.
Anonymous
use -> decltype() or -> int
Anonymous
use -> decltype() or -> int
Compiling is fine on a c++14 compiler. My problem is that I can't think of a use case where people write code like this.
Mr Xyz
Good Morningorning Everyone
Siddhant
GNU MP is an example.
I don't get it
Anonymous
I don't get it
The GNU Multiple Precision Arithmetic Library
Anonymous
It's working.
olli
I would suggest to get rid of the bind, otherwise it's fine
olli
in this case you can just pass func2 Entity entity(func2);
Chary Boy
Hlw
Mr Xyz
Hello
Pablo humano
Hello, i create a C++ server to get files from a Python script. When i send the size of the file, It get me a error than crash the program, may anyone say me why this happend?
V01D
Hard to say without any error message
V01D
Also, what code failed? The server or the client
Pablo humano
This get me the error
Anonymous
This get me the error
/warn screen photo
Pablo humano
Okey sry
Pablo humano
Also, what code failed? The server or the client
the server code failed, but the error appear in the cliente code
Pablo humano
but the error appear because I send the size of a file from a client (3640214590) and the server receive that 3640214590�OV, and when I try to convert to a double it crash
V01D
Does it work without conversion
Pablo humano
No, because i receive the data in a char*, but when I try to save in a double, the program give me a syntax error, I need convert it con atoi() for save in the double, but the buffer receive the number with �OV and the conversion fail,
Pablo humano
Why not use std::string over char*
because recv() need a parameter char* not a string
Pablo humano
And the problem is why i receive �OV with the long number like 3640214590 but with other like 576 i don't receive it
V01D
#inlcude <climits> std::cout << INT_MAX << '\n';
V01D
/report english
Francesco
I am sorry, i make an error
Daniele
Daniele
I mean yes the program doesn't crash anymore but I think there is the issue of why python gives back those strange numbers
Pablo humano
I don't think this is going to fix his issue
Okey sry, now i try to get the msg with a string, and i show the error, the previous time I try to (char* )str but i have to do this casting (void *)
Daniele
Bc the file size is that large I assume
well I didn't understand his previous program so I'm not going to say much lol
V01D
Okey, thanks for your help
Filesize seems bigger than what integers can hold
Anonymous
Use & benefit of struct keyword ?
Pablo humano
Filesize seems bigger than what integers can hold
yes, but i didn't use an integer, I used a double. I think the problem was in the char
V01D
/report Justin
Daniele
not a 64 bit intger
V01D
V01D
you either need a long int, or a long long int
*unsigned since he is working with filesizes
Ruslan
hello
Daniele
or he can use an int64_t defined in stdint.h
Pablo humano
you either need a long int, or a long long int
okey, i go to change the double for a long long int thank you very much