Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6206223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:24:51+00:00 2026-05-24T05:24:51+00:00

First: sorry my bad English =(( Sencond: here’s my code in Global.h: #pragma once

  • 0

First: sorry my bad English =((

Sencond:

here’s my code in “Global.h”:

#pragma once
class GlobalVariable
{
public:
    GlobalVariable(void);
    ~GlobalVariable(void);

    //------------------------------------------------
public:
    double pixelWidth;      //  do rong cua 1 pixel tren Viewport
    double pixelHeigh;      //  do cao cua 1 pixel tren Viewport

public:
    Point   oldPoint,   tempPoint;
    Circle  oldCir,     tempCir;
    DaGiac  oldDaGiac,  tempDaGiac;
    Color   oldObjColor,tempObjColor, OxyColor;

};

class Point
{
public:
    Point(void);
    ~Point(void);

    double  x,y;            // toạ độ (x,y)
};

class Color
{
public:
    Color(void);
    ~Color(void);

    double R,G,B;           // màu (R,G,B)
};

class DaGiac
{
public:
    DaGiac(void);
    ~DaGiac(void);

    int numOfPeak;  //so' dinh?
    Point peakArr[10];  //  ve da giac canh so dinh toi da la 10
};

class Circle
{
public:
    Circle(void);
    ~Circle(void);

    Point centre;
    double radius;

};


and I have some eror 🙁

------ Build started: Project: GAS, Configuration: Debug Win32 ------
Compiling...
GlobalVariable.cpp
e:\documents\bin\gas_project\globalvariable.h(15) : error C2146: syntax error : missing ';' before identifier 'oldPoint'
e:\documents\bin\gas_project\globalvariable.h(15) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
e:\documents\bin\gas_project\globalvariable.h(15) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
e:\documents\bin\gas_project\globalvariable.h(15) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
e:\documents\bin\gas_project\globalvariable.h(16) : error C2146: syntax error : missing ';' before identifier 'oldCir'
e:\documents\bin\gas_project\globalvariable.h(16) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
e:\documents\bin\gas_project\globalvariable.h(16) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
e:\documents\bin\gas_project\globalvariable.h(16) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
e:\documents\bin\gas_project\globalvariable.h(17) : error C2146: syntax error : missing ';' before identifier 'oldDaGiac'
e:\documents\bin\gas_project\globalvariable.h(17) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
e:\documents\bin\gas_project\globalvariable.h(17) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
e:\documents\bin\gas_project\globalvariable.h(17) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
e:\documents\bin\gas_project\globalvariable.h(18) : error C2146: syntax error : missing ';' before identifier 'oldObjColor'
e:\documents\bin\gas_project\globalvariable.h(18) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
e:\documents\bin\gas_project\globalvariable.h(18) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
e:\documents\bin\gas_project\globalvariable.h(18) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
e:\documents\bin\gas_project\globalvariable.h(18) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Build log was saved at "file://e:\Documents\BIN\GAS_Project\Debug\BuildLog.htm"
GAS - 17 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

But after I delete the GlobalVariable class! Only class Point, Color, DaGiac, Circle exist! It has no eror!
Tell me why? And how to corect that error ? Please =((

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T05:24:52+00:00Added an answer on May 24, 2026 at 5:24 am

    The compiler can’t “see” the other classes, because they’re defined after the GlobalVariable class. Move the whole GlobalVariable class to the bottom of the file so that all of the classes it depends on will be defined when it needs them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First, sorry for my bad english, I'm French. Here the problem : I have
(Sorry for my bad english) Well, I've 3 errors in my code. Error's: First
first,sorry for my bad English!! i'm new here and i'm a beginner of android
First of all sorry for my bad english. I'm a german guy. The code
At first sorry my bad English. I want define routing for this url: For
at first sorry my bad English I want load model in my plugin controller
First of all sorry for my bad english and Im pretty new in these
First, sorry for my bad English. I've an app which is installed on multiple
First, sorry for my bad english. I am using the mpstat tool in Ubuntu
First of all, sorry for my bad English. For my last project on my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.