C++ - Reddit
228 subscribers
48 photos
8 videos
25.3K links
Stay up-to-date with everything C++!
Content directly fetched from the subreddit just for you.

Join our group for discussions : @programminginc

Powered by : @r_channels
Download Telegram
Using cpp2/cppfront with CMake

I wrote a wrapper around the cppfront repository that adds a modern CMake (3.23+) build for cppfront, complete with automatic cpp2-to-cpp1 translation. Compatible with `find_package`, `add_subdirectory`, and FetchContent.

You can find it here: [https://github.com/modern-cmake/cppfront](https://github.com/modern-cmake/cppfront)

After building and "installing", it's as easy to use as:

cmake_minimum_required(VERSION 3.23)
project(example)

find_package(cppfront REQUIRED)

add_executable(main main.cpp2)

But if FetchContent is more your thing, then this works, too:

cmake_minimum_required(VERSION 3.23)
project(example)

include(FetchContent)

FetchContent_Declare(
cppfront
GIT_REPOSITORY https://github.com/modern-cmake/cppfront.git
GIT_TAG main # or an actual git SHA if you don't like to live dangerously
)

FetchContent_MakeAvailable(cppfront)

add_executable(main main.cpp2)

https://redd.it/xtugaf
@r_cpp
Desperate for Guidance / Need to Ramble for a Minute

Hey everyone,

Sorry, but I have to vent for a second. I have been programming for over a year. I learned C# and C++ for Unity and Unreal Engine 5 respectively. All things considered, I feel like I'm pretty decent at it. I understand all the fundamentals really well. The problem is that every time I try to do anything outside of the game engine, I literally can't do anything. Printing "Hello World" to the console inside of Visual Studio is about the zenith of my abilities. The reason I am so angry is because I can't find anything to help me exceed this. No matter what, any code I write is basically a word document because I can't figure out how to export it into an actual program. There is no UI. It is just text inside of Visual Studio and nothing more. Anything I try to fix this fails. I spent the last three hours trying to make one simple line of code "ImGui::Begin("Hello");" work. I keep getting LNK2019 errors and none of the solutions I have found work. Everything I try fails and I am just beyond frustrated. How does anyone learn to do this? Every tutorial teaches "Hello World" and basic principles like functions and variables but no one ever makes a program from start to finish.

I'm sorry, I know that was long, but I am at my limit and unfortunately I've run out of places to go with this problem.

https://redd.it/xu21ul
@r_cpp
HFT BOT Latency Trading

Hi, i have an HFT that averages 8% in 2-12hours of trading but on demo acc with fast exc time and low slippage.
Would like to know if anyone has theirs on a live broker and they allow payouts whenever you want and also allows you to take out as much as you want when you want.
Thank you

https://redd.it/xu99a3
@r_cpp
C++ Jobs - Q4 2022

Rules For Individuals
---------------------

* **Don't** create top-level comments - those are for employers.
* Feel free to reply to top-level comments with **on-topic** questions.
* I will create top-level comments for **meta** discussion and **individuals looking for work**.

Rules For Employers
---------------------

* If you're hiring **directly**, you're fine, skip this bullet point. If you're a **third-party recruiter**, see the extra rules below.
* **One** top-level comment per employer. If you have multiple job openings, that's great, but please consolidate their descriptions or mention them in replies to your own top-level comment.
* **Don't** use URL shorteners. [reddiquette][] forbids them because they're opaque to the spam filter.
* Templates are awesome. Please **use** the following template. As the "formatting help" says, use \*\*two stars\*\* to **bold text**. Use empty lines to separate sections.
* **Proofread** your comment after posting it, and edit any formatting mistakes.

---

\*\*Company:\*\* [Company name; also, use the "formatting help" to make it a link to your company's website, or a specific careers page if you have one.]

 

\*\*Type:\*\* [Full time, part time, internship, contract, etc.]

 

\*\*Compensation:\*\* [This section is **optional**, and you can omit it without explaining why. However, including it will help your job posting stand out as there is [extreme demand][] from candidates looking for this info. If you choose to provide this section, it must contain (a range of) **actual numbers** - don't waste anyone's time by saying "Compensation: Competitive."]

 

\*\*Location:\*\* [Where's your office - or if you're hiring at multiple offices, list them. If your workplace language isn't English, please specify it.]

 

\*\*Remote:\*\* [Do you offer the option of working remotely (permanently, or for the duration of the pandemic)? If so, do you require employees to live in certain areas or time zones?]

 

\*\*Visa Sponsorship:\*\* [Does your company sponsor visas?]

 

\*\*Description:\*\* [What does your company do, and what are you hiring C++ devs for? How much experience are you looking for, and what seniority levels are you hiring for? The more details you provide, the better.]

 

\*\*Technologies:\*\* [Required: do you mainly use C++98/03, C++11, C++14, C++17, or C++20? Optional: do you use Linux/Mac/Windows, are there languages you use in addition to C++, are there technologies like OpenGL or libraries like Boost that you need/want/like experience with, etc.]

 

\*\*Contact:\*\* [How do you want to be contacted? Email, reddit PM, telepathy, gravitational waves?]

---

Extra Rules For Third-Party Recruiters
---------------------
Send modmail to request pre-approval on a case-by-case basis. We'll want to hear what info you can provide (in this case you can withhold client company names, and compensation info is still recommended but optional). We hope that you can connect candidates with jobs that would otherwise be unavailable, and we expect you to treat candidates well.

Previous Post
--------------

* [C++ Jobs - Q3 2022](https://www.reddit.com/r/cpp/comments/vqy0rt/c_jobs_q3_2022/)

[reddiquette]: https://www.reddithelp.com/hc/en-us/articles/205926439
[extreme demand]: https://www.reddit.com/r/cpp/comments/sz0cd5/c_jobs_threads_should_include_salarycompensation/

https://redd.it/xucrwi
@r_cpp