Bunny
Hiii rose gm
Bunny
How r u
Ariana
You’re being too creepy to rose
S.
Anonymous
S.
Hi guys. Recently I'm practicing C++ on the Euler Project. Could anyone review my code for Problem 16 and provide criticism? Thx in advance 😆 https://wandbox.org/permlink/f6OskMukeHWYqlND
S.
I didn't use gmp or similar libs ... just for practice
Ariana
/warn crappy ad
Anonymous
rosee
Anonymous
i need a prgram
Anonymous
i need a prgram
Yee, me too
Anonymous
Yee, me too
which u want
Anonymous
which u want
A good one, which solves all my problems. But I'm happy with the program I write at the moment.. for now.
Walter
Send invite link
S.
Hi guys. Recently I'm practicing C++ on the Euler Project. Could anyone review my code for Problem 16 and provide criticism? Thx in advance 😆 https://wandbox.org/permlink/f6OskMukeHWYqlND
Specifically ... I don't like the interface std::string largeMultiply(const std::string *a, const std::string *b) which uses pointers, but since I wanna "rename" them in the function as longStr and shortStr according to their sizes (though not necessarily a must for this case), passing references seem difficult to do that because I can't swap "primitive" references. Any good idea?
Anonymous
What do u mean?
"plz sir can you teach me c++, I'm beginner, send me c++ book, I want to download turbo c++!!"
Anonymous
xD
Mat
😂😂😂😂
S.
MᏫᎻᎯᎷᎷᎬᎠ
What do u mean?
"Plz teach me C I want make windoz" "Plz, provide C pdfs"
MᏫᎻᎯᎷᎷᎬᎠ
Like that
Anonymous
Hello everyone :D
Anonymous
Heya
S.
Hi
Anonymous
So turbo c++ is for old heads? 🤔
Anonymous
Yeah
Anonymous
That’s sad
Anonymous
Hmm... No not really
Anonymous
or probably cuz my school still uses it
Anonymous
Thats a shame
S.
Still using dos?
Anonymous
no lmao 😂
Anonymous
Still using turbo-c++ is also lmao
Anonymous
well it still gets the job done
S.
in dos
Anonymous
well it still gets the job done
Sure, except modern compiler features, modern C/C++ standards and probalbly generating good code for 64bit arch
Anonymous
I agree
Anonymous
/rules
Ariana
70% of Indians I saw started there programming life by begging (plz sir)
meanwhile i was the only one i knew who knew programming for 2 years crippp
Anonymous
meanwhile i was the only one i knew who knew programming for 2 years crippp
Everyone of us started once.. but without begging lol
Anonymous
And without pirated pdfs
Dima
so I found the .net international chat in telegram and it’s full of begging people wtf..
Dima
let’s keep our place clean
Anonymous
Yeah
Anonymous
ok what is the best complier on android cppdroid many codes didn't work gcc g++ in termux the same
Shamsald8n
Where is it
Shamsald8n
Oh yeah I am on it
Hatim
void createBinary(const std::string fileName) { std::ofstream fp(fileName,std::ios::binary); if(!fp.is_open()) { std::cerr « "Cannot opent the file\n"; exit(EXIT_FAILURE); } std::cout « "Enter content to the file\n"; std::string content; getline(std::cin,content); size_t size = content.size(); fp.write((char*)&size,sizeof(size)); fp.write(reinterpret_cast<char*>(&content),size); fp.close(); } void showBinary(const std::string fileName) { std::ifstream fp(fileName,std::ios::binary); if(!fp.is_open()) { std::cerr « "Cannot opent the file\n"; exit(EXIT_FAILURE); } std::string content; size_t size; fp.read((char*)&size,sizeof(size)); content.resize(size); fp.read(reinterpret_cast<char*>(&content),size); std::cout « content; fp.close(); } int main() { createBinary("out.bin"); showBinary("out.bin"); } in showBinary function it does not read the file
SmInFoTech
hi
M.Munther
Hi 😅… Ok
klimi
Hi
Talula
Hi hi
Dima
welcome
Anonymous
Can anyone explain Dynamic memory allocation
SmInFoTech
welcome
Thanks Sr
SmInFoTech
Dynamic Memory Allocation in C using malloc(), calloc(), free() and realloc() Since C is a structured language, it has some fixed rules for programming. One of it includes changing the size of an array. An array is collection of items stored at continuous memory locations. As it can be seen that the length (size) of the array above made is 9. But what if there is a requirement to change this length (size). For Example, if there is situation where only 5 elements are needed to be entered in this array. In this case the remaining 4 indices are just wasting memory in this array. So there is a requirement to lessen the length (size) of the array from 9 to 5.
SmInFoTech
#include <stdio.h> #include <stdlib.h>    int main() {        // This pointer will hold the     // base address of the block created     int* ptr;     int n, i, sum = 0;        // Get the number of elements for the array     n = 5;     printf("Enter number of elements: %d\n", n);        // Dynamically allocate memory using malloc()     ptr = (int*)malloc(n * sizeof(int));        // Check if the memory has been successfully     // allocated by malloc or not     if (ptr == NULL) {         printf("Memory not allocated.\n");         exit(0);     }     else {            // Memory has been successfully allocated         printf("Memory successfully allocated using malloc.\n");            // Get the elements of the array         for (i = 0; i < n; ++i) {             ptr[i] = i + 1;         }            // Print the elements of the array         printf("The elements of the array are: ");         for (i = 0; i < n; ++i) {             printf("%d, ", ptr[i]);         }     }        return 0; }
klimi
Nice
Dima
please format the code
Ludovic 'Archivist'
Can anyone explain Dynamic memory allocation
In C++ you would use new, delete, or a container such as std::vector to achieve dynamic memory allocation
D0ubl3G
Hi there!
Dima
welcome
D0ubl3G
Thanks!!
D0ubl3G
Hope you can help me with a problem I am facing with a C++ code
D0ubl3G
with an access violation on execution xD
S.
D0ubl3G
Can I send pastebin link?
Thespartann
Can I send pastebin link?
Well seems like the bot doesen't like that
Dima
if code is short enough you can post there
Dima
but please format your code
Thespartann
Btw i think this bot should not be here anymore
D0ubl3G
PkyhCTws
D0ubl3G
that after pastebin . com