Hi, i'm not familiar with c++ but would like to have a little command line tool to check my lotto numbers. i wrote a pseudo pseudo code and it would be nice if somebody could translate it into actual c++ code. It should work like that:
I have a .txt file with 6 numbers in every line, about 30 lines. i want the program compare every line for matches of the numbers i feed to the program via console. the numbers are seperated by space, like that: 8 23 5 44 12 27
$y as integer
$c as integer
$a as integer
$input as integerarray
$tip as integerarray
read $input from command line
$c = number of integer numbers in $input
open tipfile.txt
for every line in tipfile.txt
read $tip from line
$y = number of integer numbers in line
while $y >= 0
while $c >= 0
if $input[$c] == $tip[$y] $a=$a+1;
$c=$c-1;
$y=$y-1;
if $a > 2 print $a else print "fail";
$a=0;
exit