Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
C++CodeRAD Studio

In C++ – Fantastic Ball Physics And Wonderful Wide Strings

In C++ Fantastic Ball Physics And Wonderful Wide Strings

Hello Again C++ Developers,

We have new LearnCPlusPlus.org  picks for you this week.

LearnCPlusPlus.org is the fresh source to learn how to use the powerful Modern C++ language in easy steps. We test examples with the latest RAD Studio, C++ Builder versions (10.4.2) to test modern ways in CLANG C++ Standards. Because of CLANG, most of our posts are compatible with Dev-C++, C++ Builder Community Edition, Visual C++, GNU C+/C++, Objective-C. Some of our posts are specific to VCL and FMX examples in C++ Builder. We are also trying to run old core methods in new modern ways in the latest C++ IDE. We really believe this and everything we do is aimed at giving you a rapid introduction to programming in C++ if you’re a beginner, all the way to the most robust, modern, and latest techniques for those more experienced with the language or for those who are perhaps wanting to expand their knowledge with the most up-to-date features, routines, and methodologies.

Here are our favorite C++ posts of this week

Lots of great posts this week. Here are our picks from LearnCPlusPlus.org,

  • How To Simulate 3D Ball Physics In C++ Using OpenGL
  • Learn To Simulate Realistic 2D Ball Physics in C++ Builder
  • How To Simulate Realistic Physical Effects in C++
  • The Right Way To Access Character Elements Of A Wide String
  • This Is How To Get A Substring of a Wide String in C++
  • How To Swap One Wide String With Another Wide String

What are the top C++ questions from the game developers?

  • How we can simulate realistic 2D ball physics in an easy and accessible way?
  • How we can simulate a ball physics in a given ball velocity, and gravity in that environment?
  • Can we simulate 3D balls in a cube?
  • How we can use OpenGL in C++ Builder?
  • How we can add some physics to a 3D object to make it more realistic?
  • Can we do 3D animations in OpenGL? 
  • How we can simulate throwing images, objects or other components on your form when the user interacts with them using their keyboard or mouse?
  • How can simulate the effect of force on objects on the 2D Form window?
  • Can we throw balls in our apps as in sport games?

We answer some C++ questions especially for C++ beginners

  • How can I access a character of a wstring?
  • How can I use the at() method of wide strings?
  • Can I use front() and back() methods in std::wstring to access characters?

How to simulate realistic 2D or 3D ball physics with Viewport3D or OpenGL

In C++, we can simulate realistic 2D and 3D ball physics in easy and accessible ways. We can simulate ball physics with given ball velocity, and gravity in that environment. Here are our posts about these,

Learn how to use C++ Wide String methods

Modern C++ uses Wide Strings and Unicode Strings to support worldwide languages. Wide Strings (std::wstring) uses wchar_t as the character type which means they are 2-bytes chars and they are an instantiation of the basic_string class template.  In C++, there are several type definitions for common character types and one of them is std:wstring types that are defined in header <string>. Here are the some of methods about using wide strings;

We keep adding new topics about C++ in general and specific topics for C++ Builder, Dev-C++, and for the other C++ compilers. Please keep following our LearnCPlusPlus.org website for the latest posts and updates. Feel free to comment and share with your colleagues, students, members – knowledge is power, and knowledge shared is empowering.

Check out everything you need to know about Substring C++ in this informative blog.


C++ Builder is the easiest and fastest C and C++ IDE for building simple or professional applications on the Windows, Mac-OS, iOS & Android operating systems. There is a free C++ Builder Community Edition for students, beginners, and startups; it can be downloaded from here. For professional developers, we have Professional, Architect, or Enterprise versions of C++ Builder and there is a trial version you can download from here.


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

About author

Dr. Yilmaz Yoru has 35+ years of coding with more than 30+ programming languages, mostly C++ on Windows, Android, Mac-OS, iOS, Linux, and some other operating systems. He graduated and received his MSc and PhD degrees from the Department of Mechanical Engineering of Eskisehir Osmangazi University. He is the founder and CEO of ESENJA LLC Company. His interests are Programming, Thermodynamics, Fluid Mechanics, Artificial Intelligence, 2D & 3D Designs, and high-end innovations.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES