Is it possible to write the same things in C++?

Programming related discussions related to game research
tongbal
Posts: 7
Joined: Sat Apr 22, 2017 10:40 am

Is it possible to write the same things in C++?

Post by tongbal »

Your work (for example) http://aluigi.altervista.org/adv.htm#realwin_2011 and other vulnerabilities abusing/exploits
are almost always written in C. I'm very interested in your work but because my goal is Reverse Engerneering and some other stuff I learned C++ for few months now. My question is if it's possible to make the same thing in C++ too. If so, what would be the pros and cons if it's written in C++?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Is it possible to write the same things in C++?

Post by aluigi »

Just curious to know what's the difference between C and C++ for minimal tools like my proof-of-concept code.
tongbal
Posts: 7
Joined: Sat Apr 22, 2017 10:40 am

Re: Is it possible to write the same things in C++?

Post by tongbal »

why did you decide to use C instead of C++? Doesnt C++ has more variety?
atom0s
Posts: 250
Joined: Sat Dec 27, 2014 8:49 pm

Re: Is it possible to write the same things in C++?

Post by atom0s »

C++ is a superset language of C, you can code in C within C++ if you wanted to. C++ adds more modern things to the language but it is not required to be used at all.
He probably wrote the tools in C because it was what he is familiar with rather than C++. Any of his tools can be ported and compiled as C++ with ease.
tongbal
Posts: 7
Joined: Sat Apr 22, 2017 10:40 am

Re: Is it possible to write the same things in C++?

Post by tongbal »

thanks for answer!