klimi
So you just want to spam a question here then
Wisenky
Its what you understand as you wish
klimi
What? OwO
klimi
@Neko_cpp your opinion?
Dima
whaat, it’s okay
Wisenky
source code is too long to write here and contents a few files so I dont want to bring here
klimi
Maria33
I’m programming in C an iterative negros and I have to write this. How do you express this in C? Thanks!
Maria33
Method*
Dima
use for() loop
Dima
for (int k = 0; k < n; k++)
Dima
oh wait.. I am probably wrong
Maria33
for (int k = 0; k < n; k++)
But when I’m using the for(.....) how can I express the product inside?
Maria33
I know that for sums is sum+=solution, with product is with an asterisk * ?
Francisco
But when I’m using the for(.....) how can I express the product inside?
Why don't you try it first and show us what you've done later? You learn more by trying than letting others tell you what to do
Ashish Bhushan
Or you can use this loop For(k=0;k<=n;k++) Val=val*k;
Ashish Bhushan
And also you have to define val or the type of function you are using lile the general definition of ak in your question
Anonymous
I read half of "Principles and Practice Using C++", and it is not very easy for me. I want to practice, do you recommend any book? To put in practice all that I studied in the book.
Ashish Bhushan
Else the product will always be zero
Ashish Bhushan
Start from the very basic programmes and go further ..coz you can not excel programming only by bools
Ashish Bhushan
*books
Anonymous
I will do it
Ashish Bhushan
Yes
Anonymous
I like to compare my program with others solutions
Anonymous
in other to learn of my mistakes
Ashish Bhushan
Ohk...that's good...so google has everything you know 😃
Anonymous
but yes i will try to find programs, thanks
Ashish Bhushan
Internet is best suited for that...communities are there
Ashish Bhushan
but yes i will try to find programs, thanks
When did you start programming?
Anonymous
i am working three years
Anonymous
of it
Anonymous
but i feel that i need to improve more. I pass three years fixiing things not desainig
Ashish Bhushan
So you are not a student?
Anonymous
nope
Ashish Bhushan
nope
Ohh
Ashish Bhushan
Thanks!
No.problem.buddy😃
Ansya
%d its a decimal interger
Ashish Bhushan
No %d is whole number
Ashish Bhushan
Float data type has decimal integers
Ashish Bhushan
%f
Ashish Bhushan
They are for whole numbers like 2,5,6 etc you cannot have a value like 5.6932 with %d data type
Ashish Bhushan
You can get it only by %f data type
professor
why is hard to develop an exploitable example of int overflow?
professor
I also tried this
professor
it doesnt meet the way to execute arbitrary code
Mar!o
why is hard to develop an exploitable example of int overflow?
let i: u8 = 0xff + 1; or just -1 but thats underflow
professor
sue, but the way isnt showing the vulnerable code without arbitrary code on it
Mar!o
Hmm
Mar!o
let i, lol
Oh I forgot this is a C++ group - I'm writing so much Rust currently .. sry
Dima
I thought this is Swift
Mar!o
Oh didn't know it has a let keyword too - I stay far away from Apple products
professor
javascript too
Dima
ban for js
professor
well. v8
professor
😂
Wisenky
guys I need help :(
klimi
Go ahead
Wisenky
Go ahead
who are you
Wisenky
https://github.com/pipd0un/L.D.Network
Wisenky
https://github.com/pipd0un/L.D.Network
anyone would help me to fix issue ?
klimi
who are you
Just........ Random time traveler...
klimi
Not really....
Ansya
uint8 i = LONG_MAX; ?
Unsigned interger stored in 8bit 0-255 decimal / 0xFF hexa decimal
Dima
that was for a sarcastic example
Anonymous
Hi all, I want to help Can i encrypt strings in c++ Make it unreadable ?
Кирилл 🤤
Hello, guys. I'm trying to understand allocators. And I've a problem with memory allocation. Why is output of calling test<std::vector> (output = 4096 bytes) different from the below circle (output = 4024 output). Where are 72 bytes? template <template <typename T, typename AllocT> typename ContainerT> void test() { // std::atomic_int my::g_memory_used(0); std::cout << __PRETTY_FUNCTION__ << std::endl; std::cout << "Memory usage before: " << my::g_memory_used.load() << std::endl; ContainerT<int, my::Allocator<int>> cont; for (int i = 0; i < 1000; i++) { cont.insert(std::end(cont), i); } std::cout << "Memory usage after: " << my::g_memory_used.load() << std::endl; } int main(int argc, char const* argv[]) { test<std::vector>(); // 4096 std::vector<int> v; size_t _size = 0; for (size_t i = 0; i < 1000; i++) { v.insert(std::end(v), i); _size = sizeof(std::vector<int>) + (sizeof(int) * v.size()); std::cout << "[Count: " << v.size() << "]" << " Memory usage: " << _size << std::endl; } // result equals 4024 return 0; }
Кирилл 🤤
Didn't read the code Maybe in first case you are ballancing to 2**n?
I found a solution: just replace v.size() to v.capacity()
klimi
Hi all, I want to help Can i encrypt strings in c++ Make it unreadable ?
Look into basics of cryptography and chose the algorithm that suits your need
Anonymous
That's a practice problem
Anonymous
Will you help me