Anonymous
Please don't post pictures of code
AngryMethane
#include <iostream> #include <fstream> #include <string> #include <vector> int main(void) { std::string filename("/var/log/HttpProxy.log"); std::ofstream logFile; try { logFile.open(filename, std::ofstream::app | std::ofstream::out); logFile << "Hello, C++!" << std::endl; logFile.close(); } catch (const std::ios_base::failure &ex) { std::cout << ex.what(); return -1; } }
itsmanjeet
you have to delete it yourself
delete _pointer name_ ??
Parra
int * p = new int; delete p;
Mat
Already corrected months ago
Anonymous
Hmm http://www.cplusplus.com/reference/ios/ios/exceptions/ probably better explaination
itsmanjeet
Already corrected months ago
I not a gnome fan Just comparing xfce vs kde vs gnome overalll Then got know that stuff
AngryMethane
carefully...
Anonymous
Thanks… I didn’t read the doc 🙁
No problem, you're welcome :)
Mat
👍
In fact memory leaks occur while the app is running
itsmanjeet
In fact memory leaks occur while the app is running
If app close then memory dellocated auto matically ??
itsmanjeet
You have to kill it to be sure
return 0 is enough?? My program not run in background
BinaryByter
hes a C guy
Parra
😂
BinaryByter
also, don't use auto
BinaryByter
please
BinaryByter
STOP OVERUSING AUTO
BinaryByter
(not just you, EVERYONE)
BinaryByter
well he has the C mentality
Parra
😂
BinaryByter
"don't let the stl wrap your pointers. just do your own memory management"
Parra
i still think stl is better but i assumed the guy asked about raw pointers
BinaryByter
nobody should ever be made to deal with pointers until they become good
BinaryByter
please
BinaryByter
STOP OVERUSING AUTO
BinaryByter
(not just you, EVERYONE)
BinaryByter
xD
Dima
wtf
klimi
wtf
Do you think it wasn't?
BinaryByter
yea
BinaryByter
verbose, but you know whats going on
Parra
😂 not that
Ariana
Web?
Ariana
Then you will have to suffer under learning lamp
Ariana
And practice ctfs, they help
Ariana
For web there are some books that helps, sadly there isnt like a mbe for web Web Application’s Hacker’s Handbook The tangled web
BinaryByter
here, you can use auto
BinaryByter
here, its not too big of a deal
BinaryByter
IFF your loop is not too large
Anonymous
I really like the auto specifier.
Anonymous
Boost and iterators got way less annoying to read
Ariana
auto is nearly js var
Ariana
tho im getting used to it
Anonymous
tho im getting used to it
Mhm. Determining when to use auto is easy. Does it improves readability and prevents huge verbosity? If yes, use it. Don't use it allways and don't use it never. Use it when its usefull.
Anonymous
For example, why should I write stuff like that? Auto is perfect here as vehlwn said.
AngryMethane
Thanks. I will read the related doc carefully 🙂
Yadnesh Kalal
Hii
Aadarshhh
anyone has tried implementing RSA or XOR algorithm for encryption using C?
Aadarshhh
can you provide me source code..
Anonymous
can you provide me source code..
It was a repository at university, I don't have access anymore, sorry. But I bet there are many implementations online. You should search for a education implementation, cause most implementations are tuned and tweaked to the max (mine also, cause it was the objective in the course). For learning you should search for a naiv implementation.
Anonymous
If you want to use it in real project: don't. Never implement your own crypto.
Aadarshhh
Thank you bro. But I just wanna lok how things over there as I've heard more about it.
Anonymous
Ok :)
Aadarshhh
I look at couple of repo in github but can't understand the workflow.
Anonymous
I look at couple of repo in github but can't understand the workflow.
Cause of the code or cause of the algorithm itself?
Aadarshhh
cause of code
Anonymous
Maybe you found some of the really tweaked ones. As I said, especially RSA gets tweaked as much it can cause the operations behind it are very expensive. Try to search for some naiv implementations
Ariana
Dont ever use your own implementation
Ariana
ever
Ariana
Rsa is very simple actually
Aadarshhh
ok but can't find in open ssl too..
Ariana
it is in
Aadarshhh
can you provvide link?