I never knew there was a keyword, do, in C ++!what is it?
This is the loop:
do { ... } while(someCondition);
Good thing it is used with while keyword:
do { ... } while(foo)
Unlike a loop for a do-while loop, it always runs at least once .
Also note that do {} while (0) is a commonly used idiom in the Linux kernel, see this faq for details.
. , . ,
do { /* Code will always be executed at least once */ /* something needed to be done once or more times */ } while ( /* not done /* )
as
while( /* not done */) { /* this code may never be executed */ }
while ( ), , do..while, , , , while, .
do do... while. while, , do... while .
do while , () .
do while
while ( );
Source: https://habr.com/ru/post/1782119/More articles:review / history of resident memory usage - memory-managementRecommended web technologies for WPF developer? - c #Проблема в понимании некоторых аспектов "Онтологии пиццы" - protegeHow do you compare music data - javaRun the command "stty raw" in the same terminal? - javaWhy do my Fluent NHibernate subclass mappings generate redundant columns? - c #How to use Scala Order # back using TreeMap? - scalaASP.NET MVC mapping template for generic type - c #Проверьте, имеет ли элемент определенный атрибут, используя HtmlAgilityPack в VB.Net - vb.netAlgorithm for determining (x, y) coordinates for rectangles, so that the area of the surrounding rectangle is minimal? - algorithmAll Articles