NXiss7
😅😅😅
Khaleed
Asad
hey friends, my compilator is not being able to calculate large numbers. for example, if i want to pow(12, 12), is gives me negative number. any ideas how to solve this?
Asad
yep
Asad
no sorry. my visual studio was set to x86. now i changed it to x64. but still...
Asad
int foo(int n){ int sum = 1; for (; 0 < n; --n) { sum *= pow(n, n); std::cout << sum << " "; } std::string num = std::to_string(sum); int zeros = 0; for (int i = 0; i < num.length(); ++i) { if (num.at(i) == '0') zeros++; } return zeros; }
Stanislav
🙈
Asad
🙈
what? )
Stanislav
pow works only with floating point numbers, you have implicit casts to double, result casts and truncates to signed 4 byte int
Stanislav
if you change int sum to double sum, you can get 8.9161e+12
Asad
ahh got cha. thank you bro)
Anonymous
Is anybody familiar with FFT coding in C?
Anonymous
Any GitHub links ? To see your work?
Anonymous
Kindly help.
Anonymous
Is it good to do competitive programming with C or Cpp will be better?
Artöm
Cpp will be better due to memory management
M Shehzen
can u please tell me the difference between dot operator and → operators
M Shehzen
/rules
Mar!o
Mar!o
Yes
Deleted Account
Hello, does anyone know how to use MFT correctly in the windows kernel to read files on disk? I'm using FILE_OPEN_BY_FILE_ID. FILE_NON_DIRECTORY_FILE tag to open the file, but when I read the file he would write my Stack out of the question, and ZwReadFile seemed to write my Stack badly, but I didn't do anything other than follow the code.
Deleted Account
https://gist.github.com/number201724/766a845b756fc621677c582f67f6bbd5
Deleted Account
I promise I won't call ZwReadFile, my stack everything is fine.
Ajay
That was useful. You purged it. LOL
Dima
Yes
Anonymous
Hi guys! :)
klimi
hi
Anonymous
Klimi could u dm me?
klimi
Klimi could u dm me?
no i could not
Nameful
Anonymous
?
Anonymous
While ( - - a > 0 && b > 0)
Anonymous
While ( - - a > 0 && b > 0)
Here, I thin that, first condition b > 0 is tested, and if it's satisfied, then the other condition will be tested. In other words, conventionally, conditions will be tested from right to left, right?
Deleted Account
you can print the NTSATUS Values to check error code you encountered
I checked the ntstatus in my code, but the return stack that actually happened in zwreadfile was modified, and the zwreadfile function was not returned, but the stack was corrupted.
David
Status = ZwReadFile( FileHandle, NULL, NULL, NULL, &IoStatusBlock, Data, StandardInformation.EndOfFile.LowPart, &Parameter->ByteOffset, NULL
Deleted Account
https://gist.github.com/number201724/766a845b756fc621677c582f67f6bbd5
Deleted Account
Error in ZwReadFile I don't read everything normally.
Deleted Account
And when you read files using MFT, even IoStatusBlock's structural memory is not right.
David
please check your parameters on ZwReadFile before running this API during debugging
Deleted Account
Deleted Account
I don't think I'm calling any thing wrong, because I use it elsewhere, but instead of using MFT to read files, once I use MFT to read files, the stack is corrupted.
Deleted Account
I added 10 for IoStatusBlock without stack corruption, obviously there was a problem with The IoStatusBlock of ZwReadFile, but the code I wrote according to the MSDN documentation was strange.
Anonymous
Hello
Anonymous
I want send 36 megabit data in 1 seconds with esp32 With wifi or Bluetooth I can achieve to this speed?
David
I added 10 for IoStatusBlock without stack corruption, obviously there was a problem with The IoStatusBlock of ZwReadFile, but the code I wrote according to the MSDN documentation was strange.
I think there is a small flaw in your code. The variable "IO_STATUS_BLOCK IoStatusBlock" is being used repeatedly without initialization.
Deleted Account
_Out_ PIO_STATUS_BLOCK IoStatusBlock,
Deleted Account
Microsoft code tells me that he doesn't need initialization, just a return of the result, and he has an OUT tag in front of him.
Asma
🆗
MᏫᎻᎯᎷᎷᎬᎠ
C++ Events Affected By Coronavirus **Don't talk about the coronavirus. r/cpp is not the place to discuss or debate the coronavirus.** # Purpose Many C++ conferences, meetups, and even the next committee meeting have been affected by the ongoing public health crisis caused by the coronavirus. I think it will be helpful to everyone to collect information about C++ events that have been or may be affected by the coronavirus. That includes not only cancellations/postponements, but also events that are planning to move forward but may be impacted in the future **This is intended to be a living document. Please help be suggesting changes or additions.** # Lexicon **Cancelled** == The event will definitely not be rescheduled. **Postponed** == The event will not happen on the planned dates, but may happen later this year. **Status quo** == The event has not announced any changes to the planned dates. *FIXME: Find a better word for this.* # Events - C++Now 2020 is cancelled. - Core C++ 2020 is cancelled. - ISO C++ Varna 2020 is cancelled. - ISO C++ New York 2020 is status quo. - CppCon is status quo. https://redd.it/fidita @r_cpp
F
Sorry
Anonymous
Yes
Rajat
How do I solve this error guys
Anonymous
How do I solve this error guys
First of all use dev c++ as ide 😅😅 Or try with CCS studio! We can't even read the bugs.
MilkBeforeCereal
line 2 lol
Rajat
Okk
MilkBeforeCereal
also don't put a space between & and vars
Rajat
Ok thanks
Anonymous
Remove";" from int main
MilkBeforeCereal
that too
MilkBeforeCereal
so difficult to read that lol
Mar!o
You have #dinclude
Rajat
Mar!o
Remove the d
Rajat
Now also it's showing errors
Mar!o
No semicolon after main
Anonymous
Remove semicolon which is after main
Rajat
Ok
Rajat
I have removed ,but errors are coming
Mar!o
🙄