Artöm
Not possible
Artöm
-Wall -Wextra at least
Anonymous
g++ -Wall -Wextra filename.cpp ?
Anonymous
wait.
Anonymous
Does 1<< i depends on the type of i or 1?
Artöm
Yes
Anonymous
what is the limit of 1<< i when i is int and when i is long long
Artöm
Use 1ULL
Anonymous
So, 1 << i depends on type of i?
Artöm
Not sure
Artöm
Try cppinsights to figure out
Anonymous
Please am a beginner and I want to ask know the right app for C++ programming
Pavel
Does 1<< i depends on the type of i or 1?
Type of 1, you can think of it as calling var.operator<<(i); for your custom type, that implements this operator. Where operator will be selected from the type of var.
Pavel
So var << i; the same as var.operator<<(i); so should be for basic types (but for basic types the second won't compile).
Artöm
We discussed it already
Artöm
#include <type_traits> ... static_assert(std::is_same_v<decltype(1 << 4ULL), unsigned long long>);
Artöm
Artöm
It means, type of second arg doesnt matter
Artöm
Use 1ULL as first arg
Anonymous
#offtopic
Pavel
We discussed it already
I didn't see that you've come to a conclusion there
Artöm
I forgot to forward
Giorgio
how to active the speakers with windows.h ? it is possible ?
Anonymous
Giorgio
really ? how did i not think about it
Giorgio
ty
Giorgio
sorry for disturbing
Anonymous
ty
You're welcome, just check your problem with google firstly and you'll be a happy person :)
Giorgio
you're right
professor
is this possible if (firstname == "Sam") instead of using strcmp ?
professor
if I need to use char var[10];
Anonymous
if I need to use char var[10];
No, there's no way then
professor
will I need strcmp right?
Anonymous
will I need strcmp right?
To compare C-style strings? Yes
professor
okay thanks
Anonymous
Which book preference for c++
Anonymous
/notes
Anonymous
/notes
Anonymous
Thanks
professor
hey guys , why it always goes to else part if I am checking if its 16 and comparing to 0x393130326F6B45 ? int main() { char buf[8]; int msg; unsigned int v6{}; printf("Enter cookie:\n"); scanf("%s", buf); printf("Your cookie %s \n",buf); if (v6 == 16) { if (stricmp("0x393130326F6B45", buf) == 0) { strcpy(buf, "EkoEko"); printf("cookie %s \n", buf); } else { printf(" [-] Error: Invalid cookie\n"); } } else { printf(" [-] Error: Invalid header\n"); system("pause"); } return 0; }
professor
It is supposed to catch automatic no?
Artöm
What
professor
I mea instead of writting v6 = 16 , is there other way to catch it 16?
Artöm
Catch from where
Artöm
I didn't quite understand what do you mean by catch
professor
I didn't quite understand what do you mean by catch
I mean should I add add strlen or some count function to check it right or is there to code it as pseudocode
Anonymous
I mean should I add add strlen or some count function to check it right or is there to code it as pseudocode
I'm having trouble to understand your question too. Do you mean by "catch" if there is any other way to check if v6 quals to 16? If this is your question, then you can do this with a switch-case block. But this is an overkill if you want to check only for one quality... As Artöm Bakri Al-Sarmini said, v6 is 0 because you initialized it with zero and never assigned any other number to it
Anonymous
/notes
Himanshu
Which one is faster to convert integer to string? stringstream or to_string
Nkr
/notes
Anonymous
#findprojects
Chhaganlal
Does anybody have data structures document to study?
Chhaganlal
If you have kindly share it
Chhaganlal
No need guys
Chhaganlal
I got it myself
Chhaganlal
Thanks
rex
/get
J.C
I am an human
n1coc4cola
XD
n1coc4cola
Anonymous
I am an human
I still doubt it.
Anonymous
🤦‍♂
Anonymous
8380920625
Anonymous
Add
yuuki
/report
Liam
/report
Thanks Yuuki
Liam
/report
You have a beautiful name.
yuuki
Thanks Yuuki
No probs ;)
Evgeny
/notes
Anonymous
What will be output
Anonymous
8