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

C++: Adding repeat/until functionality

Govind

The One Musketeer
Joined
Apr 22, 2005
Sythe Gold
23
Messages
7,825
C++: Adding repeat/until functionality
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;
}
 
C++: Adding repeat/until functionality
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?
 
C++: Adding repeat/until functionality
Most of everything you need will be in <windows.h>. Try looking up the MSDN library for APIs.
 
C++: Adding repeat/until functionality
thankyou so much man!!! i really appreciate it, i was having the hardest time finding a function list, your the best
 
Runescape Gamblingrunescape gambling
Back
Top