question about linux time command??

ok so im running the time command on linux like this i try is many different ways
i already compile it
time sortselection.cpp <twolist
-bash: sortselection.cpp: command not found //line 2

real 0m0.002s
user 0m0.000s
sys 0m0.000s
why do i get line 2??? does this mean is running well or do i have to run it differently
my input file is twolist and sortselcection.cpp does the sort of list of numbers that is on two list is works but i want the time it takes to do
thanks
You have to run the time command on a complied program.
g++ sortselection.cpp
time ./a.out
i do
g++ sortselection.cpp
$ ./a.out <twolist //inputfile
==================
2
3
33
54
435
549
578
8789
==================
time sortselection.cpp <twolist
-bash: sortselection.cpp: command not found

real 0m0.002s
user 0m0.000s
sys 0m0.000s
time ./a.out < twolist

run this
omg thanks it work i appreciate it
Topic archived. No new replies allowed.