EC++ related problem

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2009
Posts: 5
Reputation: kiranpreddy05 is an unknown quantity at this point 
Solved Threads: 0
kiranpreddy05 kiranpreddy05 is offline Offline
Newbie Poster

EC++ related problem

 
0
  #1
Oct 13th, 2009
  1. class StripChartWindow : public PegDecoratedWindow
  2. {
  3. public:
  4. StripChartWindow(const PegRect& Rect, const PEGUINT TitleId);
  5. virtual ~StripChartWindow() {}
  6.  
  7. virtual PEGINT Message(const PegMessage& Mesg);
  8.  
  9. private:
  10. PegStripChart* mpChart;
  11. PegStripChart* mpChart2;
  12.  
  13. PEGUBYTE mID;
  14. PEGUBYTE mSin;
  15. PEGUBYTE mID2;
  16. PEGUBYTE mSin2;
  17. };

This is the part which is givin me errors as below...

error C2143: syntax error : missing ';' before '*'
error C2501: 'PegStripChart' : missing storage-class or type specifiers
error C2501: 'mpChart' : missing storage-class or type specifiers
error C2143: syntax error : missing ';' before '*'
error C2501: 'PegStripChart' : missing storage-class or type specifiers
error C2501: 'mpChart2' : missing storage-class or type specifiers
fatal error C1070: mismatched #if/#endif pair in file new.hpp'
Error executing cl.exe.
Last edited by peter_budo; 18 Days Ago at 8:35 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 2,822
Reputation: niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute 
Solved Threads: 297
Moderator
Featured Poster
niek_e's Avatar
niek_e niek_e is online now Online
Roasting Maven
 
0
  #2
Oct 13th, 2009
It doesn't recognize the type "PegStripChart". You forgot to include something? Or made a typo? I can't tell without the rest of the code.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 5
Reputation: kiranpreddy05 is an unknown quantity at this point 
Solved Threads: 0
kiranpreddy05 kiranpreddy05 is offline Offline
Newbie Poster
 
0
  #3
Oct 13th, 2009
THIS IS THE WHOLE CODE DO PLS HELP ME OUT
  1. /*--------------------------------------------------------------------------*/
  2. /*--------------------------------------------------------------------------*/
  3. // Source file originally created by PegWindowBuilder
  4. //
  5. //
  6. // Class Name: newclass
  7. //
  8. // Notes:
  9. /*--------------------------------------------------------------------------*/
  10. /*--------------------------------------------------------------------------*/
  11.  
  12.  
  13.  
  14. #include "peg.hpp"
  15. #include "new_res.hpp"
  16. #include "new.hpp"
  17. extern PegResourceTable stchart_ResourceTable;
  18.  
  19. PEGINT gChartData[] = { 100, 100, 100, 100, 100, 100, 125, 150, 175, 200,
  20. 150, 100, 50, 100, 125, 100, 100, 100 };
  21.  
  22. PEGINT gBukData[] = { 100, 100, 100, 100, 100, 100, 100, 100, 125, 100,
  23. 100, 120, 140, 160, 180, 200, 150, 100, 50, 125, 100,
  24. 100, 125, 150, 125, 100, 100, 100, 100 };
  25.  
  26.  
  27.  
  28. /*--------------------------------------------------------------------------*/
  29. /*--------------------------------------------------------------------------*/
  30.  
  31. StripChartWindow::StripChartWindow(const PegRect& Rect, const PEGUINT TitleId) :
  32. PegDecoratedWindow(Rect)
  33. {
  34. PEGCOLOR tempColor1, tempColor2, tempColor3;
  35. if(TitleId)
  36. {
  37. Add(new PegTitle(TitleId));
  38. }
  39.  
  40. PegRect ChartRect = mClient;
  41. ChartRect.Bottom = mClient.Height() / 2 - 2;
  42. mpChart = new PegStripChart(ChartRect, 130, -100, 700, 10, 100);
  43. mpChart->SetExStyle(mpChart->GetExStyle() | CS_DRAWYGRID | CS_DRAWXGRID |
  44. CS_DRAWXTICS | CS_DRAWYLABELS | CS_SCROLLED |
  45. //CS_DUALYTICS | CS_DRAWLINEFILL | CS_DRAWXLABELS |
  46. CS_DUALYTICS | CS_DRAWXLABELS |
  47. CS_DUALYLABELS);
  48. mpChart->SetExStyle(mpChart->GetExStyle() & ~CS_PAGED);
  49. Add(mpChart);
  50. tempColor1 = PegResourceManager::GetColor(CID_CYAN);
  51. tempColor2 = PegResourceManager::GetColor(CID_BLUE);
  52. tempColor3 = PegResourceManager::GetColor(CID_MAGENTA);
  53. mSin = mpChart->AddLine(tempColor1, tempColor1, tempColor3);
  54.  
  55. tempColor1 = PegResourceManager::GetColor(CID_LIGHTGREEN);
  56. tempColor2 = PegResourceManager::GetColor(CID_GREEN);
  57. tempColor3 = PegResourceManager::GetColor(CID_RED);
  58. mID = mpChart->AddLine(tempColor1, tempColor1, tempColor3);
  59. mpChart->SetYLabelScale(200);
  60.  
  61. ChartRect.Top = ChartRect.Bottom + 4;
  62. ChartRect.Bottom = mClient.Bottom;
  63. mpChart2 = new PegStripChart(ChartRect, 130, -200, 600, 10, 100);
  64. mpChart2->SetExStyle(mpChart2->GetExStyle() | CS_DRAWAGED |
  65. CS_XAXISONZEROY | CS_DRAWXTICS | CS_DRAWXLABELS);
  66. //CS_DRAWLINEFILL);
  67.  
  68. Add(mpChart2);
  69. tempColor1 = PegResourceManager::GetColor(CID_LIGHTBLUE);
  70. tempColor2 = PegResourceManager::GetColor(CID_BLUE);
  71. tempColor3 = PegResourceManager::GetColor(CID_CYAN);
  72. mSin2 = mpChart2->AddLine(tempColor1, tempColor1, tempColor3);
  73.  
  74. tempColor1 = PegResourceManager::GetColor(CID_LIGHTGREEN);
  75. tempColor2 = PegResourceManager::GetColor(CID_GREEN);
  76. tempColor3 = PegResourceManager::GetColor(CID_GREEN);
  77. mID2 = mpChart2->AddLine(tempColor1, tempColor1, tempColor3);
  78.  
  79. }
  80.  
  81. /*--------------------------------------------------------------------------*/
  82. /*--------------------------------------------------------------------------*/
  83. PEGINT StripChartWindow::Message(const PegMessage& Mesg)
  84. {
  85. static PEGINT Index = 0, j = 0;
  86. static PEGINT Angle = 0;
  87.  
  88. switch(Mesg.Type)
  89. {
  90. case PM_SHOW:
  91. PegWindow::Message(Mesg);
  92. SetTimer(1, PEG_ONE_SECOND, 1);
  93. break;
  94.  
  95. case PM_HIDE:
  96. PegWindow::Message(Mesg);
  97. KillTimer(1);
  98. break;
  99.  
  100. case PM_TIMER:
  101. {
  102. if(++Index > 17)
  103. {
  104. Index = 0;
  105. }
  106.  
  107. mpChart->AddData(mID, gChartData[Index]);
  108.  
  109. if(++j > 28)
  110. {
  111. j = 0;
  112. }
  113. mpChart2->AddData(mID2, gBukData[j]);
  114.  
  115. if((Angle += 10) > 350)
  116. {
  117. Angle = 0;
  118. }
  119.  
  120. PEGINT Sin, Cos;
  121. PegLookupSinCos(Angle, &Sin, &Cos);
  122. mpChart->AddData(mSin, (PEGLONG)((Sin * 125) >> 10) + 400);
  123. mpChart2->AddData(mSin2, (PEGLONG)((Cos * 125) >> 10) + 400);
  124. }
  125.  
  126. default:
  127. {
  128. return(PegWindow::Message(Mesg));
  129. }
  130. }
  131.  
  132. return 0;
  133. }
  134.  
  135.  
  136.  
  137. void PegAppInitialize(PegPresentationManager *pPresentation)
  138.  
  139. {
  140. PegRect Rect;
  141. Rect.Set(10, 10, 630, 470);
  142.  
  143. PegResourceManager::InstallResourcesFromTable(&stchart_ResourceTable);
  144. StripChartWindow* pWindow = new StripChartWindow(Rect, SID_TITLE);
  145. pPresentation->Add(pWindow);
  146.  
  147.  
  148. }
Last edited by peter_budo; 18 Days Ago at 8:36 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)
Reply With Quote Quick reply to this message  
Reply

Tags
c++, embedded, error, gui

Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC