Hi !

Some (weird) problem i got :

I have a header file, InputHandler.h, which has one Class called InputH, and inside i have public: and a Void named Hi().

When i try to include InputHandler.h in PRPT.cpp, i get an error, weird one; The error says that i should put a ; before the using, like this :

#include <iostream>
#include <windows.h>
#include <string>
#include "Linker.h"
#include "InputHandler.h"

;using namespace std;
using namespace System;
using namespace System::IO;

And it works !

WHY ?!
Why should i put a ; ?

Recommended Answers

All 2 Replies

> Why should i put a ; ?
Because it needs it.

However, it might be better placed at the end of InputHandler.h (say at the end of a class declaration), rather than in your C++ code just to make the compiler shut up.

You probably forgot to terminate the last class defined in InputHandler.h with a semicolon.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.