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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:55:49+00:00 2026-05-13T14:55:49+00:00

I am trying to build a program to Tolkinize a string (i’m trying to

  • 0

I am trying to build a program to Tolkinize a string (i’m trying to do this with out using the string class – so as to learn more about pointers and how chars work) – I have built a program that i think works (any suggestions would be great!) When i tried to compile the program I get these random errors:

Error 1 error LNK2019: unresolved external symbol “public: char * __thiscall Tokenize::next(void)” (?next@Tokenize@@QAEPADXZ) referenced in function _main Driver

Error 2 error LNK2019: unresolved external symbol “public: __thiscall Tokenize::Tokenize(char const * const,char)” (??0Tokenize@@QAE@QBDD@Z) referenced in function _main Driver

Error 3 fatal error LNK1120: 2 unresolved externals C:\Users\Simmons 2.0\Documents\School\CS1410\project 5\Token\Debug\Token.exe

I have showed this code to a couple of friends that code and none of them could figure out what is going on – or what i’m doing wrong…

Note: I am running VS 2008 express edition – Windows 7 x64


Main.cpp

#include <iostream>
#include "tokenize.h" /// Tolkenize class
using namespace std;

int main ( )
{

 // create a place to hold the user's input
 // and a char pointer to use with the next( ) function
 char words[128];
 char * nextWord;

 cout << "\nString Tokenizer Project";
 cout << "Enter in a short string of words:";
 cin.getline ( words, 127 );

 // create a tokenizer object, pass in the char array
 // and a space character for the delimiter
 Tokenize tk( words, ' ' );

 // this loop will display the tokens
 while ( ( nextWord = tk.next() ) != NULL ) {
  cout << nextWord << endl;
    }

    system("PAUSE");
 return 0;
}

tokenize.h

#include <iostream>
#include <cassert>  /// assert
#include <cstdlib>  /// system("cls")
using namespace std;

#ifndef TOKENIZE_H
#define TOKENIZE_H

#include <iostream>
#include <cassert>
#include "Tokenize.h"
using namespace std;

class Tokenize {
private:
 char * current_ptr;
 char delimiter;
public:
 Tokenize ();
 Tokenize (char);
 Tokenize (char const string [], char Delimiter);
 void setcurrent_ptr ( char * ptr ){ current_ptr = ptr; }
 void setdelimiter ( char Delimiter ) { delimiter = Delimiter; }
 char * getcurrent_ptr () { return current_ptr; }
 char getdelimiter () { return delimiter; }
 char * next ();
};          

#endif

tokenize.cpp

#include <iostream>
#include <cassert>  /// assert
#include "Tokenize.h"
using namespace std;

Tokenize::Tokenize() { 
 current_ptr = new char;
 *current_ptr = NULL;
 delimiter = ' ';
};

Tokenize::Tokenize(char Delimiter) {
 current_ptr = new char;
 *current_ptr = NULL;
 delimiter = Delimiter;
};

Tokenize::Tokenize(char const string [], char Delimiter) {
 current_ptr = string;
 delimiter = Delimiter;
};

char * Tokenize::next() {
 char * ptr = current_ptr;
 If ( (*ptr) == NULL ) { return NULL; }
 else {
  while ((current_ptr)++ != ' ') {}
  if ( (*current_ptr) == NULL) { return NULL; }
  if ( *current_ptr == ' ' ) { *current_ptr = '/0'; (current_ptr)++; }
  return ptr;
 }
};

From my testing (commenting out lines) I think one of the errors come from the tokinze.next()

  • 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-13T14:55:49+00:00Added an answer on May 13, 2026 at 2:55 pm

    It looks like you’re not compiling/linking tokenize.cpp.

    It’s probably not the code itself, but how you have it setup in Visual Studio.

    Is it possible that VS isn’t including tokenize.cpp in your application?

    You can test that this is the problem by moving the functions from tokenize.cpp to main.cpp. If the errors go away, that’s the problem.

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

Sidebar

Ask A Question

Stats

  • Questions 357k
  • Answers 357k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer First I would suggest using boost::thread as opposed to pthreads… May 14, 2026 at 9:00 am
  • Editorial Team
    Editorial Team added an answer Port_DataReceived is obviously an async event handler that is being… May 14, 2026 at 9:00 am
  • Editorial Team
    Editorial Team added an answer ListExt is the list - so you can just call… May 14, 2026 at 9:00 am

Related Questions

I am trying to reverse engineer the build system of a commercial Windows based
I am trying to build a program using the command scons compiler = msvc.
I am trying to build a test program in c++ to automate testing for
I am trying to build a Lisp grammar. Easy, right? Apparently not. I present
I am asking for help on self-help, which is kind of an oxymoron. How

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.