i wrote but the Read function is just for a single character
any function for int numbers?
int i = Console::Read();
Console::WriteLine(i);
One way is to call ReadLine() then convert the String to int using Convert::ToInt(str)
thanks
You can still use the standard C++ methods like cin:
#include "stdafx.h"
#include <iostream>
using namespace System;
using namespace std;
int _tmain()
{
int i;
cin >> i;
Console::WriteLine(i);
Console::ReadLine();
return 0;
}
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.