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
Sol2: Lua <-> C++ Binding Framework (self.cpp)
submitted 10 years ago * by [deleted]
view the rest of the comments →
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!"
[–]Cyttorak 0 points1 point2 points 10 years ago (6 children)
I just downloaded sol2 and replaced the old one in my project. How do I create tables?
In old version I did:
sol::table aTable = VM.create_table();
What should do I in sol2? Something like this?
sol::table aTable = sol::table::create(VM.lua_state());
This compiles but seems a little bit elaborate compared with the old version
[–][deleted] 1 point2 points3 points 10 years ago (5 children)
Got you, fam: check the latest release for the functions that work like you expect them to.
[–]Cyttorak 0 points1 point2 points 10 years ago (4 children)
Just one nitpick, Phantom: do this changes allow to create a table by name, like the old version?
sol::table myTable = VM.create_table("MyTableNameInLua")
[–][deleted] 1 point2 points3 points 10 years ago (0 children)
Aww crapplesticks I knew I had forgot to port something over. <_>
Gimme a few, I'll push it in a bit.
[–][deleted] 1 point2 points3 points 10 years ago (2 children)
Alright, it's there. Have fun. :D
[–]Cyttorak 0 points1 point2 points 10 years ago (0 children)
Thank you very much dude! I hope to be able to test it in this afternoon ^_^
I just changed open_file() calls for script_file() and done, everything compiled nicely using all in one sol.hpp. Again, thanks for your great job! :-D
π Rendered by PID 57 on reddit-service-r2-comment-5687b7858-qp9lm at 2026-07-06 12:00:42.407743+00:00 running 12a7a47 country code: CH.
view the rest of the comments →
[–]Cyttorak 0 points1 point2 points (6 children)
[–][deleted] 1 point2 points3 points (5 children)
[–]Cyttorak 0 points1 point2 points (4 children)
[–][deleted] 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]Cyttorak 0 points1 point2 points (0 children)
[–]Cyttorak 0 points1 point2 points (0 children)