Rewrite GetInt syscall
This commit is contained in:
parent
5cccda4af3
commit
3609600063
4 changed files with 8 additions and 8 deletions
|
@ -70,13 +70,11 @@ void ConsoleDriver::PutInt(int n)
|
|||
delete [] buffer;
|
||||
}
|
||||
|
||||
int ConsoleDriver::GetInt()
|
||||
void ConsoleDriver::GetInt(int * n)
|
||||
{
|
||||
int n;
|
||||
char *buffer = new char[MAX_STRING_SIZE];
|
||||
GetString(buffer,MAX_STRING_SIZE);
|
||||
sscanf(buffer, "%d", &n);
|
||||
sscanf(buffer, "%d", n);
|
||||
delete [] buffer;
|
||||
return n;
|
||||
}
|
||||
#endif // CHANGED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue