online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
def addData(data): if isinstance(data, str): try: with open("data.txt", "a") as file: file.write(data + "\n") return "Done" except Exception: return "Error writing to file" else: return "Type error" returnValue = addData("The larch") print(returnValue) returnValue = addData(123) print(returnValue)
Monty Python

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