online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
function getUserLocation() { return new Promise((resolve) => { setTimeout(() => { resolve({ lat: 40.7128, lon: -74.0060 }); // New York City }, 1000); // Simulating a delay }); } function getWeatherData(location) { return new Promise((resolve) => { setTimeout(() => { resolve({ temp: 72, condition: "Sunny" }); }, 1500); // Simulating a delay }); } function displayWeather(weather) { console.log(`The weather is ${weather.temp}°F and ${weather.condition}`); } // Using our asynchronous functions getUserLocation() .then(location => getWeatherData(location)) .then(weather => displayWeather(weather)) .catch(error => console.error("An error occurred:", error)); console.log("Weather app initialized!");

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue