fork download
  1. #ifndef LABEL_H
  2. #define LABEL_H
  3.  
  4. #include <array>
  5. #include <string>
  6. #include <vector>
  7.  
  8. class Labels
  9. {
  10.  
  11. private:
  12.  
  13. struct ImageInfo
  14. {
  15. int xOffset; /* pixel count offset before next digit */
  16. std::string fileName;
  17. //cairo_surface_t *image;
  18. char *image;
  19. };
  20.  
  21. //std::array<ImageInfo, 14> NumberImages;
  22. std::vector<ImageInfo> NumberImages;
  23.  
  24. public:
  25. Labels();
  26. ~Labels();
  27. };
  28.  
  29. #endif//
  30. #include <cairo/cairo.h>
  31. #include <iostream>
  32. #include <array>
  33.  
  34.  
  35. // Constructor
  36. Labels::Labels() :
  37. NumberImages{ {
  38. { 8, "images/0.png", NULL },
  39. { 10, "images/1.png", NULL },
  40. { 10, "images/2.png", NULL },
  41. { 10, "images/3.png", NULL },
  42. { 10, "images/4.png", NULL },
  43. { 10, "images/5.png", NULL },
  44. { 10, "images/6.png", NULL },
  45. { 10, "images/7.png", NULL },
  46. { 10, "images/8.png", NULL },
  47. { 10, "images/9.png", NULL },
  48. { 7, "images/$.png", NULL },
  49. { 10, "images/euro.png", NULL },
  50. { 7, "images/pound.png", NULL },
  51. { 7, "images/yen.png", NULL }
  52. }}
  53. {
  54.  
  55.  
  56. std::cout << "NumberImages[0].fileName = " << NumberImages[0].fileName << std::endl;
  57. // InitImages
  58.  
  59. std::cout << "Labels Created" << std::endl;
  60. }
  61.  
  62.  
  63. Labels::~Labels()
  64. {
  65. // call DestroyNumberImages
  66. std::cout << "Labels Destroyed" << std::endl;
  67. }
  68.  
  69.  
  70. int main()
  71. {
  72. Labels label;
  73.  
  74. std::cout << "Exit main\n";
  75.  
  76. return( 0 );
  77. }
  78.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:30:26: fatal error: cairo/cairo.h: No such file or directory
compilation terminated.
stdout
Standard output is empty