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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:46:32+00:00 2026-05-17T23:46:32+00:00

I am currently writing a token recognizer for XML. I am going along the

  • 0

I am currently writing a token recognizer for XML. I am going along the basis of FSA’s to do so. So I have a Header file that has the following code…

#define MAX_LENGTH    512
#define  MAX_NAME  25

struct token 
{
  char name[MAX_NAME + 1];
  int type;
  unsigned char str[MAX_LENGTH + 1];
 };

 #define TOKEN_TYPES 8

 #define SPACES  0
 #define NEWLINE  1
 #define WORD  2
 #define BEGINTAG  3
 #define ENDTAG  4
 #define EMPTYTAG 5
 #define ERROR 6
 #define ENDFILE 7

With this I am getting the error:

error C2011: 'token' : 'struct' type redefinition

I am also getting another strange error in my gettoken.cpp file. Where I actually implement the FSA. The File is far to long to display the entire contents. But with this I am getting the error…

error C1014: too many include files : depth = 1024

And here is part of the code for that .cpp file. I will only include my imports in this.

#include  <iostream>
#include  <fstream>
#include  <stdlib.h>
#include  <string>
#include  "Token.h"

using namespace std;

I am sure it is something silly as it usually is for me. But please help me out! Thanks!

  • 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-17T23:46:33+00:00Added an answer on May 17, 2026 at 11:46 pm

    I assume you’re somehow including your header file twice. Do you have a guard against that? Every header file should have this:

    #ifndef TOKEN_H
    #define TOKEN_H
    
    [your header file code]
    
    #endif
    

    If that’s not it, make sure you’re not defining token twice somewhere else.

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

Sidebar

Related Questions

I am currently writing a simple, timer-based mini app in C# that performs an
I'm currently writing a simple .sh script to parse an Exim log file for
I am currently writing a little bootstrap code for a service that can be
Im currently writing my bachelor thesis with latex and using TexnicCenter. I want to
Our company is currently writing a GUI automation testing tool for compact framework applications.
I am currently writing a small calendar in ASP.Net C#. Currently to produce the
I'm currently writing an ASP.Net app from the UI down. I'm implementing an MVP
I'm currently writing an interface to allow applications to send exception data to a
I'm currently writing a TYPO3 extension which is configured with a list of tt_content
Scenario: I'm currently writing a layer to abstract 3 similar webservices into one useable

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.