Anonymous
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
Anonymous
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.
Anonymous
Walter
Send invite link
Mat
Farhan
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
😂😂😂😂
klimi
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
I agree
Anonymous
/rules
Anonymous
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
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.
klimi
Nice
Dima
please format the code
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?
S.
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
Thespartann
D0ubl3G
that after pastebin . com