Parra
because it's much faster and it doesn't have same restrictions as the high level languages
Parra
or..
Parra
it also happens the oposite
Parra
for example, a game engine written in c++ embeds an interpreter, to extend functionality
Parra
for example, blender is coded in c/c++
Parra
but you can embed Python scripts to extend the functionality
Parra
😄👍
Luis José
Thanks you so much for the explanation 😊
Parra
your welcome
Parra
another example is tensorflow
Anonymous
Who can explain how to make multiproject in VS?
Parra
tensorflow is a high performance library for AI, machine learning.. etc
Parra
it is done in c/c++ but it has a wrapper for python, so you can use it from python easily
BinaryByter
xD
Anonymous
Hi! My name is Damien Loeb
klimi
hello
MᏫᎻᎯᎷᎷᎬᎠ
If it's anything longer going to a cpp program will be worth it
I dunno what's going on But it will be OVERKILLING
Anonymous
Hi
Futorio
Will cpp do?
Maybe you choose is CPython. It's faster than traditional python, but have pythonic syntax
Mihail
It's like one of the worst parts about the language
Talula
Well I'm never done such a thing so I don't know how it works in general bro
Yes you can it’s called warping the C++ code it’s like creating lib and calling the functions from python... very inefficient but works.
Talula
inefficiency depends on the implementation
If your whole other code is running in Python which is the (slowest thing I have tested) then having C++ code is pointless.
Anonymous
Hello
Anonymous
I'm trying to copy a file from one location to another using fstream
Talula
If you really want to warp it, do it in C#, much better option, though the code will not be managed after that.
Anonymous
Google
Thx ur da best bro
Anonymous
I'm trying to copy a file from one location to another using fstream
I'm using ios::binary, but simple text files aren't getting copied properly. Any help?
Talula
#include <fstream> // std::filebuf, std::fstream #include <cstdio> // EOF int main () { std::fstream src,dest; src.open ("test.txt"); dest.open ("copy.txt"); std::filebuf* inbuf = src.rdbuf(); std::filebuf* outbuf = dest.rdbuf(); char c = inbuf->sbumpc(); while (c != EOF) { outbuf->sputc (c); c = inbuf->sbumpc(); } dest.close(); src.close(); return 0; }
Talula
(Google)
BinaryByter
use file.good() instead of character == EOF
klimi
im not a human
BinaryByter
Oh?
MᏫᎻᎯᎷᎷᎬᎠ
klimi
.
.
MᏫᎻᎯᎷᎷᎬᎠ
.
dotBot
klimi
nu
Ariana
.
.
MᏫᎻᎯᎷᎷᎬᎠ
Who started this group?
Anonymous
But sadly he deleted his telegram account without leaving any of his contact informations
Anonymous
His github account is also deleted
BinaryByter
he died
BinaryByter
he died
I hope
MᏫᎻᎯᎷᎷᎬᎠ
Just disappeared
MᏫᎻᎯᎷᎷᎬᎠ
BinaryByter
WTF
Lol jk :D
MᏫᎻᎯᎷᎷᎬᎠ
Lol jk :D
He is your friend?
MᏫᎻᎯᎷᎷᎬᎠ
Or knows you?
BinaryByter
dunno i don't know him
MᏫᎻᎯᎷᎷᎬᎠ
Hhh
Roxifλsz 🇱🇹
BinaryByter
Rood
yes. rood
BinaryByter
xD
Talula
Do you mean Grout?
BinaryByter
Talula
I wanna be dead before I go half that ugly.
BinaryByter
Keijo
doing a school excersise and this is my code https://pastebin.com/xFGVzQP1
Keijo
it works as it should be
BinaryByter
but?
Keijo
but the tests reject it... seems like there is infinite loop somewhere
Keijo
any ideas why this could be
BinaryByter
while (getchar() != n) looks like one
BinaryByter
also while (1)
Keijo
but the target is to ask new input if the first input given is faulty
Keijo
and also, what other ways there are to clear the buffer than while (getchar() != n)
BinaryByter
not many
BinaryByter
but you will have to make sure that the input REALLY contains a \n
klimi
and when it faults then set it to false
Keijo
c indeed is a bit more complicated language compared to java for instance 😅