fork download
  1. #include "employee_record.h"
  2.  
  3. #include <QtSql>
  4.  
  5.  
  6. EmployeeRecord getEmployeeRecord(qint64 id)
  7. {
  8. QSqlQuery q("SELECT * FROM employee WHERE id = " + QString::number(id));
  9.  
  10. if (q.next())
  11. {
  12. EmployeeRecord rec =
  13. {
  14. q.value(0).toInt(),
  15. q.value(1).toString(),
  16. q.value(2).toString(),
  17. q.value(3).toDouble(),
  18. q.value(4).toDate(),
  19. q.value(5).toInt(),
  20. q.value(6).toInt()
  21. };
  22. return rec;
  23. }
  24. return EmployeeRecord();
  25. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:29: fatal error: employee_record.h: No such file or directory
 #include "employee_record.h"
                             ^
compilation terminated.
stdout
Standard output is empty