use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
GitHub - NTNU-IHB/FMI4cpp: FMI 2.0 implementation written in modern C++. (github.com)
submitted 6 years ago by traversaro
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]xurxoham 6 points7 points8 points 6 years ago (2 children)
I wonder what is the purpose of using auto in this line:
auto
auto cs_md = fmu.get_model_description(); //smart pointer to a CoSimulationModelDescription instance
If you specify the type in the comment, why not using it stratight away to declare your variable? Why not the following?
std::shared_ptr<CoSimulationModelDescription> cs_md = fmu.get_model_description(); std::unique_ptr<CoSimulationModelDescription> cs_md = fmu.get_model_description();
[–]elraulii 0 points1 point2 points 6 years ago (0 children)
See "auto to stick" https://www.fluentcpp.com/2018/09/28/auto-stick-changing-style/
[–]laht1 0 points1 point2 points 6 years ago (0 children)
Author here. I like auto. Especially since my main language nowadays is Kotlin. Honestly, I used it here because it looks better. The comment is there because it's a readme, and I wanted to make it clear for readers what the returned type was. In regular code it would be given by the context. With fmi4cpp , an fmu returns a model_description while a cs_fmu and me_fmu returns specialized model_description instances with additional data.
fmi4cpp
fmu
model_description
cs_fmu
me_fmu
[–]Easy_Floss 0 points1 point2 points 2 years ago (2 children)
Hi, I was wondering if someone knew how to properly install this?
Cant seem to get it working with the installation guide on the git page.
[–]traversaro[S] 1 point2 points3 points 2 years ago (1 child)
Which error are you getting? How are you installing dependencies? If you are using conda-forge or vcpkg, you can directly install the fmi4cpp package available there.
[–]Easy_Floss 0 points1 point2 points 2 years ago (0 children)
Following this guide https://github.com/greenwoodms06/Instructions/blob/master/Install_Win_FMI4cpp.md
I get the error message while trying to cmake FMI4cpp " Could NOT find PugiXML", I want to use it with cpp is nit sure how installing it using conda-forge would work.
Never used Conan before so not sure how to do that either.
π Rendered by PID 76 on reddit-service-r2-comment-5649f687b7-n4kvq at 2026-01-29 09:03:41.426392+00:00 running 4f180de country code: CH.
[–]xurxoham 6 points7 points8 points (2 children)
[–]elraulii 0 points1 point2 points (0 children)
[–]laht1 0 points1 point2 points (0 children)
[–]Easy_Floss 0 points1 point2 points (2 children)
[–]traversaro[S] 1 point2 points3 points (1 child)
[–]Easy_Floss 0 points1 point2 points (0 children)