please don't mark as duplicate first read full question i want to know how one variable or function(with return:) return two value at same time
i am printing ASCII values of characters and when i press any arrow key then two values are printed like 224 then in next line 80 printed how it possible that one variable give me two values at same time
i am using GCC on code block in windows 7
#include <iostream>
#include <conio.h>
#include <cstdlib>
int show;
int main()
{
while(true)
{
int show = getch();
std::cout << show<<std::endl;
}
getch(); // Just to keep the console open after program execution
}
we know that arrow keys are special keys whom return two ASCII value at same time but how one variable can print both values same time