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 7429223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:56:06+00:00 2026-05-29T08:56:06+00:00

Functions.h #include <iostream> #include <windows.h> #include <conio.h> #include <limits> #include <stdexcept> #include <stdlib.h> #include

  • 0

Functions.h

#include <iostream>
#include <windows.h>
#include <conio.h>
#include <limits>
#include <stdexcept>
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include "definitions.h"
#include "globals.h"

};using namespace std;

This is in functions.h Now we have main.cpp that includes the header

Main.cpp

#include "functions.h"

int main(int argc, char *argv[])
{
    //Other stuff
    return 0;
}

For some reason I have to write }; before the using statement. It won’t let me compile unless that is before it.

Any ideas as to why?

  • 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-29T08:56:08+00:00Added an answer on May 29, 2026 at 8:56 am

    This error is probably caused by a missing }; in the globals.h file.

    The preprocessor literally pastes the contents of the #included header files into your source file. So if there is a syntax error in one of the header files, there will be a syntax error in the source file that includes it.

    And I know this doesn’t fix your problem, but you should never use using namespace std; in a header file, as that pollutes the global namespace for every translation unit that includes that header. It’s much better to keep using namespace statements local to a single source file, or better yet, just type out std::.

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

Sidebar

Related Questions

#include<iostream> #include<vector> #include<stdexcept> #include<stdio.h> using namespace std; void keep_window_open() { cin.clear(); //clear badbit flag
#include<iostream> using namespace std; struct sample { int data[3][2]; }; struct sample* function() {
I have template function compare defined as below. #include<iostream> using namespace std; template<typename T>
I've try to compile this code: #include <iostream> #include <cstdlib> using namespace std; #define
I've this following code in C++: //file0.cpp #include file11.cpp #include file22.cpp #include<iostream> #include<conio.h> using
i am using Dev C++ on windows xp #include <iostream> #include <fstream> #include <string>
Can you explain to me why this doesn't work: #include <iostream> using namespace std;
#include <algorithm> #include <stdio.h> #include <iostream> int intcomp(int *x,int *y) { return *x-*y;}; int
at the beginning I have: #include <sstream> #include <iostream> #include <stdio.h> #include <iomanip> #include
i want to do this simple piece of code work. #include <iostream> #include <windows.h>

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.