Lua
C++
Edit

Input

This function waits for a line of text to be input into the program console.

Syntax

Parameter Description
message message to print before the input is received.

Returns

When the user enters some text and presses enter, the typed input is returned.

Remarks

On Windows, the project must be built as a console app. In Configuration Properties > Linker > System set SubSystem to Console.

Example

#include "UltraEngine.h"

using namespace UltraEngine;

int main(int argc, const char* argv[])
{
    WString s = Input("Enter your name:");
    Print("You entered \"" + s + "\".");
    return 0;
}
Copyright © 2024 Ultra Software.
All rights reserved.