MᏫᎻᎯᎷᎷᎬᎠ
But a second thought Yoy can't hide from references xD
Anonymous
Why are the error?(just a joke)
Anonymous
Well, I realized that I couldn't send pictures
Shia
#include <stdio.h> int main(int argc, char* argv) { unsigned int a = -3427; printf("%d",a); return 0; } Why it's not giving me any error ?
Shia
That's what I'm asking ? If we can store negative value in unsigned then how it make sense ?
Nameful
You can't store a negative value in an unsigned integer, but an integer is the same size regardless of whether it is unsigned
Anonymous
#include<stdio.h> int temp=30; int main() { printf("Enter a humid :"); scanf("%d",'&&humid'); if(temp>32) { printf("it's Spring"); scanf("%d",'&&humid==1'); } else if(temp>32) { printf("it's Summer"); scanf("%d",'&&humid==0'); } else if(temp<32) { printf("it's Winter"); scanf("%d",'&&humid==1'); } else if ( printf("it's Autumn") ) return 0; } Write down the output when: a. Temperature=29 0 C and Humidity-I b. Temperature=35 0 C and Humidity How to do a.
Ludovic 'Archivist'
And it's confirming C++
Indeed the only thing specified is that "char must be able to contain any UTF-8 character that is exactly 8 bit long", meaning it never needs to set the first bit to 1 and can be just as well signed or unsigned
Igor🇺🇦
Can you explain it in detail ?
It depends on you platform. But in general on most platforms - 1 is just uint max. For example if we use https://en.wikipedia.org/wiki/Two%27s_complement for representation of signed int we'll have 111 for -1, but in uint the same value means 5.
Igor🇺🇦
It doesn't even give the warning
By default it doesn't. You need to enable it by adding flag.
Shia
Try with -Wall
Nothing happens
Chr
How to take memory from bulk of memory (at 1st time bulk memory allocation through malloc
Shia
It complies successfully with no warning
Chr
At requested times
Igor🇺🇦
Try with -Wall
-Wconversion is not part of - Wall. You need to have Wsign-conversion.
Igor🇺🇦
It complies successfully with no warning
Try -Wsign-conversion from https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
Ludovic 'Archivist'
Not a UTF-8 character, but a UTF-8 code point
Then it is a Utf8 code point of 7 bits
Anonymous
Shia
Try -Wsign-conversion from https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
Thanks I can see the warning now using "Wsign-conversion" but don't i get an error for this ? If no then why ? Because I'm storing the negative value in unsigned int and when it's totally opposite
Anonymous
&MainWindow::ShowPost has not the type you've written
Fixed it. void GetData(QUrl url, auto callback); And then => GetData(QUrl("url"), &MainWindow::callback) ;)
Anonymous
Do you use C++20?
Hmmm. Honestly, I don't know! lol Let me see
Ivan
Hey guys
Anonymous
Hmmm. Honestly, I don't know! lol Let me see
because auto in function arguments is available only since C++20
Anonymous
in lambda expression parameters since C++14
Anonymous
because auto in function arguments is available only since C++20
It means I don't need to claim the type of new function arg when I claim a function?
Anonymous
because auto in function arguments is available only since C++20
Hmmm. It's so nice... So it must be something more than 20.
Vlad
>Laplace demon entered the chat
Anonymous
>Laplace demon entered the chat
?Laplace transformation?
Vlad
?Laplace transformation?
google it up it has it's own wikipedia page
Anonymous
Ok
beluga_hz
Hi guys! Where do I learn how to write clear and readable code in C++?
beluga_hz
I'm looking for a sort of official docs or something like this
MᏫᎻᎯᎷᎷᎬᎠ
I'm looking for a sort of official docs or something like this
There is a core guidelines for C++ coding in github and also there a "code complete" book They should be easy to find
Igor🇺🇦
I'm looking for a sort of official docs or something like this
There is an official page on coding guidelines for C++ https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines
beluga_hz
Thank you
Is there anybody use "sololearn" app? And is it great to learn programming?
Igor🇺🇦
I'm looking for a sort of official docs or something like this
And I would really recommend https://www.oreilly.com/library/view/effective-modern-c/9781491908419/ It's not "official", but it so widely used and highly regarded as practically official guidelines.
beluga_hz
Is there anybody use "sololearn" app? And is it great to learn programming?
Is a good app that gives you basic skills. You can learn more later
Is a good app that gives you basic skills. You can learn more later
Where can i learn later is YouTube vid works?
Wisenky
guys fstream doesnt work why https://paste.pics/AX1IW
Roshan
Website or VS kinda?
Wisenky
vscode sir
Roshan
vscode sir
do ofstream not fstream
Roshan
vscode sir
fstream consists ifstream(file reading) and ofstream(file opening)
Anonymous
Hi guys! Where do I learn how to write clear and readable code in C++?
Read Mayer's books Read C++ Core Guidelines Watch Jason Turner's, Kate Gregory's and others talks
Wisenky
Did it help?
ld.exe: cannot open output file output\main.exe: Permission denied got this error sir
Wisenky
it compiled but still gives open and write error messages
Wisenky
I cleaned executable and objects now works.
Hasan
hello
Hasan
I will calculate the C ++ term average. can you help me?
Roshan
I will calculate the C ++ term average. can you help me?
Store the numbers in an array, add them and then divide by the array length.
cooper
hello
Ludovic 'Archivist'
Abdirahman Don't send PMs that ask for solutions to your homework. I personally, as someone who teaches, find it worse than not doing it yourself
Ludovic 'Archivist'
......
🤚
......
Hi I need some help in coding plz