• Log in or sign up for an account here: https://www.sythe.org/login

C++: Adding repeat/until functionality

Govind

The One Musketeer

Highly Respected
Mudkips
Retired Administrator
Joined
Apr 22, 2005
Sythe Gold
23
Messages
7,825
Le Monkey
PHP Shit Show 2k26
Potamus
Prove it!
Sythe Awards 2011 Winner
Tier 1 Prizebox
Tortoise Penis
Trole
UWotM8?
Wait, do you not have an Archer rank?
This makes it easier for people familiar with Delphi and SCAR to use C++ by adding the familiar repeat/until loop. Only difference is that it must be capitalized to fit naming conventions.
Add this to the beginning of your file(s) after the includes/other directives:
Code:
#define REPEAT do{
#define UNTIL( condition ) }while(!(condition));
Example usage:
Code:
#include <iostream>
#define REPEAT do{
#define UNTIL( condition ) }while(!(condition));
using namespace std;
int main(int argc, char *argv[])
{
    int i = 0;
    REPEAT
          cout << "The value of i is: " << i <<  endl;
          i++;
    UNTIL(i==10)
    system("PAUSE");
    return EXIT_SUCCESS;
}
 
you seem fairly knowledgeable in c++ so could you help me, i know this is bacic but the programs ive written in the past in c++ never interacted with the screen, so how do i parse the screen for a color or a bitmap? what includes will i need?
 
Le Monkey
PHP Shit Show 2k26
Potamus
Prove it!
Sythe Awards 2011 Winner
Tier 1 Prizebox
Tortoise Penis
Trole
UWotM8?
Wait, do you not have an Archer rank?
Most of everything you need will be in <windows.h>. Try looking up the MSDN library for APIs.
 
thankyou so much man!!! i really appreciate it, i was having the hardest time finding a function list, your the best
 
duelarena.gg
Back
Top