Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussion: C++ and Rust comparing #12

Closed
Marcus-Rise opened this issue Aug 22, 2022 · 2 comments
Closed

Discussion: C++ and Rust comparing #12

Marcus-Rise opened this issue Aug 22, 2022 · 2 comments

Comments

@Marcus-Rise
Copy link

Is C++ a better language in this case than Rust? I want to learn rust, it's often compared to C++, and I'm trying to understand variants of implementation of this language.

@womblee
Copy link
Contributor

womblee commented Aug 25, 2022

C++ is way simpler and I think you should figure it out first, there is a high chance that you will waste a lot of time to get good at Rust.

I like Rust, but it’s a weird choice for memory hacking in a C++ code base. And syntax is way worse...

It can be a nice ass language like this:

let chlclient = crate::utils::interfaces::GetInterface::<*const tf2::engine::CHLClient>("./tf/bin/client.so", "VClient0").expect("Failed to get CHLClient's interface");

And then it can also be:

 let clientmode = unsafe { **(((*((*(chlclient as *mut *mut usize)).offset(10))) + 1) as *mut *mut *mut usize) };

Just learn c++👍

@womblee womblee closed this as completed Aug 25, 2022
@womblee
Copy link
Contributor

womblee commented Aug 25, 2022

But it can be nice because it's fun* (type fun* not found, did you mean *const fn?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants